Improve string operations in perfdata
Fixed double free in end_handshake