Fix Socks5 memory leak