From 12387ca4e5c16994bacad52c142ef94868ba545a Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Sat, 27 Aug 2011 22:03:45 +0100 Subject: lib/libalpm/signing.c: Fix memory leak in decode_signature() in case of error. Signed-off-by: Diogo Sousa Signed-off-by: Dan McGee --- lib/libalpm/signing.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c index b21b6c46..5beea5e1 100644 --- a/lib/libalpm/signing.c +++ b/lib/libalpm/signing.c @@ -175,6 +175,7 @@ static int decode_signature(const char *base64_data, size_t destlen = len * 3 / 4; MALLOC(*data, destlen, goto error); if(base64_decode(*data, &destlen, usline, len)) { + free(*data); goto error; } *data_len = destlen; -- cgit v1.2.3-70-g09d2