fix memory leak in client connection struct