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
1 changed files with 6 additions and 4 deletions

View File

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