]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
socks: properly maintain the status of 'done'
authorx2018 <xkernel.wang@foxmail.com>
Mon, 27 Oct 2025 14:29:38 +0000 (22:29 +0800)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 27 Oct 2025 15:31:37 +0000 (16:31 +0100)
Closes #19255

lib/socks.c

index 238e140b06864b74034aa629baf33367a64ca9ba..9936aaf5bb15a2ce96c59e14b0cb012dda6ae4f7 100644 (file)
@@ -1248,8 +1248,10 @@ static CURLcode socks_proxy_cf_connect(struct Curl_cfilter *cf,
 
   if(!sx) {
     cf->ctx = sx = calloc(1, sizeof(*sx));
-    if(!sx)
-      return CURLE_OUT_OF_MEMORY;
+    if(!sx) {
+      result = CURLE_OUT_OF_MEMORY;
+      goto out;
+    }
 
     /* for the secondary socket (FTP), use the "connect to host"
      * but ignore the "connect to port" (use the secondary port)