Skip to content

Commit

Permalink
Prevent a memory leak in digest.c
Browse files Browse the repository at this point in the history
  • Loading branch information
juhovh committed Feb 26, 2014
1 parent 6e521c7 commit 06582fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/digest.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,11 @@ digest_is_valid(const char *our_realm, const char *password,
}

if (!username || !realm || !nonce || !uri || !response) {
free(auth);
return 0;
}
if (strcmp(realm, our_realm) || strcmp(nonce, our_nonce) || strcmp(uri, our_uri)) {
free(auth);
return 0;
}

Expand Down

0 comments on commit 06582fe

Please sign in to comment.