]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
schannel: fix memory leak during handshake
authorJay Satiro <raysatiro@yahoo.com>
Wed, 27 Aug 2025 02:33:38 +0000 (22:33 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 27 Aug 2025 06:10:04 +0000 (02:10 -0400)
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

lib/vtls/schannel.c

index 7fb4cb1fde3494e3fa599c475c7aca6bb405f912..e75351f12f2d57e9d98be987911954eb54e04f01 100644 (file)
@@ -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;
     }