socks_sspi: use free() not FreeContextBuffer()

The memory is allocated with malloc().

This reverts commit 1d01d4975f.

Reported-by: Stanislav Fort (Aisle Research)
Closes #19445
This commit is contained in:
Daniel Stenberg 2025-11-10 11:08:26 +01:00
parent 37050a1462
commit 7e87255020
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View 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;
}