فهرست منبع

Issue 2376 – Failure when proxy hostname resolution fails with SFTP/SCP protocols

https://winscp.net/tracker/2376

Source commit: 5014ea48bd61dc233b76168f8719f9cd769f5971
Martin Prikryl 5 ماه پیش
والد
کامیت
2a9075b4f9
1فایلهای تغییر یافته به همراه10 افزوده شده و 0 حذف شده
  1. 10 0
      source/putty/proxy/proxy.c

+ 10 - 0
source/putty/proxy/proxy.c

@@ -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.