Fix memory leak in zsocket