From: Juho Vähä-Herttua Date: Wed, 26 Feb 2014 07:07:00 +0000 (+0200) Subject: Prevent a memory leak in digest.c X-Git-Tag: upstream/0.9.0~4^2~11 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=06582fecd198c26f1970a2e779e7bd9519e60cd2;p=deb_shairplay.git Prevent a memory leak in digest.c --- diff --git a/src/lib/digest.c b/src/lib/digest.c index 78c916e..2291215 100644 --- a/src/lib/digest.c +++ b/src/lib/digest.c @@ -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; }