aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-08-17 22:58:48 +0100
committerSteve Holme <steve_holme@hotmail.com>2014-08-17 23:08:55 +0100
commit23d52ca4a7be5e3c942dc001e95cff6ba905f1a1 (patch)
treee011e94660435f2f6f0c71415fcea1813a700d1b
parent437b9ba46fa01a5865ff5c9fde1177f1a7dab559 (diff)
sasl_sspi: Fixed a memory leak with the GSSAPI base-64 decoded challenge
-rw-r--r--lib/curl_sasl_sspi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/curl_sasl_sspi.c b/lib/curl_sasl_sspi.c
index 422b2f64c..df4da9645 100644
--- a/lib/curl_sasl_sspi.c
+++ b/lib/curl_sasl_sspi.c
@@ -416,8 +416,11 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
&resp_desc, &attrs,
&tsDummy);
- if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED)
+ if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
+ Curl_safefree(chlg);
+
return CURLE_RECV_ERROR;
+ }
if(memcmp(&context, krb5->context, sizeof(context))) {
s_pSecFn->DeleteSecurityContext(krb5->context);
@@ -431,6 +434,9 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
resp_buf.cbBuffer, outptr, outlen);
}
+ /* Free the decoded challenge */
+ Curl_safefree(chlg);
+
return result;
}