From: Miroslav Franc Date: Fri, 19 Aug 2016 12:46:07 +0000 (+0200) Subject: spnego_sspi: fix memory leak in case *outlen is zero (#970) X-Git-Tag: curl-7_50_2~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0796a993171f627d546c42a8fb28e906528cc688;p=thirdparty%2Fcurl.git spnego_sspi: fix memory leak in case *outlen is zero (#970) --- diff --git a/lib/vauth/spnego_sspi.c b/lib/vauth/spnego_sspi.c index 1222a654df..f83c44632e 100644 --- a/lib/vauth/spnego_sspi.c +++ b/lib/vauth/spnego_sspi.c @@ -265,8 +265,10 @@ CURLcode Curl_auth_create_spnego_message(struct Curl_easy *data, if(result) return result; - if(!*outptr || !*outlen) + if(!*outptr || !*outlen) { + free(*outptr); return CURLE_REMOTE_ACCESS_DENIED; + } return CURLE_OK; }