From: Jay Satiro Date: Wed, 27 Aug 2025 02:33:38 +0000 (-0400) Subject: schannel: fix memory leak during handshake X-Git-Tag: curl-8_16_0~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9be9f9466665f259696bc8903a239ed8fd793a2;p=thirdparty%2Fcurl.git schannel: fix memory leak during handshake Follow-up to b6a5f672 which improved the handshake procedure. Ref: https://github.com/curl/curl/pull/18323 Closes https://github.com/curl/curl/pull/18410 --- diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 7fb4cb1fde..e75351f12f 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -1246,6 +1246,7 @@ schannel_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data) if(!SOCKET_WRITABLE(Curl_conn_cf_get_socket(cf, data), 0)) { SCH_DEV(infof(data, "schannel: handshake waiting for writeable socket")); connssl->io_need = CURL_SSL_IO_NEED_SEND; + free(inbuf[0].pvBuffer); return CURLE_OK; }