diff options
author | Miroslav Franc <mfranc@gmx.com> | 2016-08-19 14:46:07 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-08-19 14:46:07 +0200 |
commit | 0796a993171f627d546c42a8fb28e906528cc688 (patch) | |
tree | 8996adff687aded2f8616437f4663e6f60fe8d98 /lib | |
parent | 2497c42172307485fb60100474b68c1620041df5 (diff) | |
download | curl-0796a993171f627d546c42a8fb28e906528cc688.tar.gz |
spnego_sspi: fix memory leak in case *outlen is zero (#970)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vauth/spnego_sspi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/vauth/spnego_sspi.c b/lib/vauth/spnego_sspi.c index 1222a654d..f83c44632 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; } |