digest_sspi: fix a memory leak on error path

Closes #19567
This commit is contained in:
x2018 2025-11-17 19:37:35 +08:00 committed by Daniel Stenberg
parent 11c0aaa339
commit 821cba8fac
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -583,6 +583,7 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
/* Allocate our new context handle */
digest->http_context = calloc(1, sizeof(CtxtHandle));
if(!digest->http_context) {
Curl_pSecFn->FreeCredentialsHandle(&credentials);
curlx_unicodefree(spn);
Curl_sspi_free_identity(p_identity);
free(output_token);