socks_sspi: use the correct free function

When freeing buffers allocated by SSPI, use its own function, not free().

Reported-by: Joshua Rogers
Closes #19046
This commit is contained in:
Stefan Eissing 2025-10-13 11:32:17 +02:00 committed by Daniel Stenberg
parent 14e4d9c3c7
commit 1d01d4975f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -590,9 +590,12 @@ error:
Curl_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
if(names.sUserName)
Curl_pSecFn->FreeContextBuffer(names.sUserName);
free(sspi_w_token[0].pvBuffer);
free(sspi_w_token[1].pvBuffer);
free(sspi_w_token[2].pvBuffer);
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(etbuf);
return result;
}