]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
socks_sspi: use free() not FreeContextBuffer()
authorDaniel Stenberg <daniel@haxx.se>
Mon, 10 Nov 2025 10:08:26 +0000 (11:08 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 10 Nov 2025 12:39:22 +0000 (13:39 +0100)
The memory is allocated with malloc().

This reverts commit 1d01d4975f540f3a363b38e1296aead62130fc6d.

Reported-by: Stanislav Fort (Aisle Research)
Closes #19445

lib/socks_sspi.c

index 31645527a36f9f6d74e26e9b5059cf6ed6aef2af..975172576c35d80696577f27ad71c11a24a659c3 100644 (file)
@@ -588,12 +588,9 @@ error:
     Curl_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
   if(names.sUserName)
     Curl_pSecFn->FreeContextBuffer(names.sUserName);
-  if(sspi_w_token[0].pvBuffer)
-    Curl_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
-  if(sspi_w_token[1].pvBuffer)
-    Curl_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
-  if(sspi_w_token[2].pvBuffer)
-    Curl_pSecFn->FreeContextBuffer(sspi_w_token[2].pvBuffer);
+  free(sspi_w_token[0].pvBuffer);
+  free(sspi_w_token[1].pvBuffer);
+  free(sspi_w_token[2].pvBuffer);
   free(etbuf);
   return result;
 }