summaryrefslogtreecommitdiff
path: root/lib/vauth/krb5_sspi.c
diff options
context:
space:
mode:
authormigueljcrum <miguel@localhost>2019-09-06 13:43:51 +0000
committerDaniel Stenberg <daniel@haxx.se>2019-09-10 08:06:05 +0200
commit67b30b341811cd0bc60bdaab5a7c5532fa23f623 (patch)
tree17145bdfc914749a1b1ab13a70726a6cf44e5201 /lib/vauth/krb5_sspi.c
parentcb3dc99175a2b1cd272272c73d85c6426af70edd (diff)
downloadcurl-67b30b341811cd0bc60bdaab5a7c5532fa23f623.tar.gz
sspi: fix memory leaks
Closes #4299
Diffstat (limited to 'lib/vauth/krb5_sspi.c')
-rw-r--r--lib/vauth/krb5_sspi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/vauth/krb5_sspi.c b/lib/vauth/krb5_sspi.c
index 6ac049eb3..98041d915 100644
--- a/lib/vauth/krb5_sspi.c
+++ b/lib/vauth/krb5_sspi.c
@@ -58,6 +58,11 @@ bool Curl_auth_is_gssapi_supported(void)
TEXT(SP_NAME_KERBEROS),
&SecurityPackage);
+ /* Release the package buffer as it is not required anymore */
+ if(status == SEC_E_OK) {
+ s_pSecFn->FreeContextBuffer(SecurityPackage);
+ }
+
return (status == SEC_E_OK ? TRUE : FALSE);
}