aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-01-18 17:02:55 +0000
committerSteve Holme <steve_holme@hotmail.com>2015-01-18 15:40:07 +0000
commitb9fd757d03c990cbd859ec93bfd943ef3503176a (patch)
tree48b6cff36679331f79d7badcedcf756c3d2cf6fc
parent3a9419f65a2f7981110487d806c9eb5086f4ab37 (diff)
sasl_gssapi: Fixed memory leak with local SPN variable
-rw-r--r--lib/curl_sasl_gssapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/curl_sasl_gssapi.c b/lib/curl_sasl_gssapi.c
index d8f811961..cee00e10a 100644
--- a/lib/curl_sasl_gssapi.c
+++ b/lib/curl_sasl_gssapi.c
@@ -122,8 +122,12 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
if(GSS_ERROR(gss_major_status)) {
Curl_gss_log_error(data, gss_minor_status, "gss_import_name() failed: ");
+ Curl_safefree(spn);
+
return CURLE_OUT_OF_MEMORY;
}
+
+ Curl_safefree(spn);
}
else {
/* Decode the base-64 encoded challenge message */