Fix memory leak in socks connecter