]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
digest_sspi: fix a memory leak on error path
authorx2018 <xkernel.wang@foxmail.com>
Mon, 17 Nov 2025 11:37:35 +0000 (19:37 +0800)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 17 Nov 2025 13:46:30 +0000 (14:46 +0100)
Closes #19567

lib/vauth/digest_sspi.c

index f04c3845abe96a0e9e00881bd02d0e00875cbd15..f730c52987a313c760f7dc18bf088ab9185ed938 100644 (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);