|
@@ -98,7 +98,13 @@ static void sk_proxy_close (Socket *s)
|
|
|
{
|
|
|
ProxySocket *ps = container_of(s, ProxySocket, sock);
|
|
|
|
|
|
+ #ifdef WINSCP
|
|
|
+ if (ps->sub_socket != NULL)
|
|
|
+ #endif
|
|
|
sk_close(ps->sub_socket);
|
|
|
+ #ifdef WINSCP
|
|
|
+ if (ps->proxy_addr != NULL)
|
|
|
+ #endif
|
|
|
sk_addr_free(ps->proxy_addr);
|
|
|
sk_addr_free(ps->remote_addr);
|
|
|
proxy_negotiator_cleanup(ps);
|
|
@@ -567,6 +573,10 @@ Socket *new_connection(SockAddr *addr, const char *hostname,
|
|
|
|
|
|
ps->sub_socket = NULL;
|
|
|
|
|
|
+ #ifdef WINSCP
|
|
|
+ ps->proxy_addr = NULL;
|
|
|
+ #endif
|
|
|
+
|
|
|
/*
|
|
|
* If we've been given an Interactor by the caller, set ourselves
|
|
|
* up to work with it.
|