1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

src/http.c: fix error return of digest_authentication_encode()

Reported-by: Coverity bug #1188036
This commit is contained in:
Tim Ruehsen 2015-03-16 21:28:25 +01:00 committed by Tim Rühsen
parent 8d4bb928b9
commit 014b1d6041

View File

@ -3859,15 +3859,17 @@ digest_authentication_encode (const char *au, const char *user,
if (!realm || !nonce || !user || !passwd || !path || !method || !qop) if (!realm || !nonce || !user || !passwd || !path || !method || !qop)
{ {
if (!qop)
*auth_err = UNKNOWNATTR;
else
*auth_err = ATTRMISSING;
xfree (realm); xfree (realm);
xfree (opaque); xfree (opaque);
xfree (nonce); xfree (nonce);
xfree (qop); xfree (qop);
xfree (algorithm); xfree (algorithm);
if (!qop)
*auth_err = UNKNOWNATTR;
else
*auth_err = ATTRMISSING;
return NULL; return NULL;
} }