X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/038ec85e825fc940c1387f64a88ae73b75f6822b..5fd70d0768f86274b22e73f3cd8f59fec0325e36:/proxy.c diff --git a/proxy.c b/proxy.c index 70da38c3..8a146231 100644 --- a/proxy.c +++ b/proxy.c @@ -277,8 +277,8 @@ static int plug_proxy_accepting (Plug p, OSSocket sock) * This function can accept a NULL pointer as `addr', in which case * it will only check the host name. */ -static int proxy_for_destination (SockAddr addr, char *hostname, int port, - Conf *conf) +static int proxy_for_destination (SockAddr addr, const char *hostname, + int port, Conf *conf) { int s = 0, e = 0; char hostip[64]; @@ -474,6 +474,7 @@ Socket new_connection(SockAddr addr, char *hostname, if (sk_addr_error(proxy_addr) != NULL) { ret->error = "Proxy error: Unable to resolve proxy host name"; sfree(pplug); + sk_addr_free(proxy_addr); return (Socket)ret; } sfree(proxy_canonical_name);