From: x2018 Date: Mon, 27 Oct 2025 14:29:38 +0000 (+0800) Subject: socks: properly maintain the status of 'done' X-Git-Tag: rc-8_17_0-3~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c97ff8c120f2ba3d4c6f1ceb7ca834cb98d808e;p=thirdparty%2Fcurl.git socks: properly maintain the status of 'done' Closes #19255 --- diff --git a/lib/socks.c b/lib/socks.c index 238e140b06..9936aaf5bb 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -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)