aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_sasl.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2014-08-22 21:40:05 +0200
committerDan Fandrich <dan@coneharvesters.com>2014-08-22 21:40:05 +0200
commit1a073a20db78bb0d0250bda27def4f03ac2b6001 (patch)
tree518c9f1eb9422254d8872a8943de711365061fae /lib/curl_sasl.c
parent63a0bd4270decef04e64fbe497b42f2c9e26c62b (diff)
sasl: Fixed a memory leak on OOM
Diffstat (limited to 'lib/curl_sasl.c')
-rw-r--r--lib/curl_sasl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
index 8f6aab2e8..7e2b8afaf 100644
--- a/lib/curl_sasl.c
+++ b/lib/curl_sasl.c
@@ -569,6 +569,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
"qop=%s",
userp, realm, nonce,
cnonce, nonceCount, spn, resp_hash_hex, qop);
+ Curl_safefree(spn);
if(!response)
return CURLE_OUT_OF_MEMORY;
@@ -576,7 +577,6 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
result = Curl_base64_encode(data, response, 0, outptr, outlen);
Curl_safefree(response);
- Curl_safefree(spn);
return result;
}