From d804ff0d6bb3608cac83b08f3946d2403c6c8fb7 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sun, 10 Aug 2014 10:33:10 +0100 Subject: sasl_sspi: Fixed missing free of challenge buffer on SPN failure --- lib/curl_sasl_sspi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/curl_sasl_sspi.c b/lib/curl_sasl_sspi.c index a77b503b2..f570332fd 100644 --- a/lib/curl_sasl_sspi.c +++ b/lib/curl_sasl_sspi.c @@ -163,8 +163,11 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, /* Generate our SPN */ spn = Curl_sasl_build_spn(service, data->easy_conn->host.name); - if(!spn) + if(!spn) { + Curl_safefree(chlg); + return CURLE_OUT_OF_MEMORY; + } /* Populate our identity structure */ result = Curl_create_sspi_identity(userp, passwdp, &identity); -- cgit v1.2.3