summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiogo Sousa <diogogsousa@gmail.com>2011-08-27 22:03:45 +0100
committerDan McGee <dan@archlinux.org>2011-08-28 19:50:22 -0500
commit12387ca4e5c16994bacad52c142ef94868ba545a (patch)
treefd61c2225737101d3a09176024ba4034fd3b2ad4
parent0dad2f6e6223e2aa00c43b59f49bf83082a0d6bb (diff)
lib/libalpm/signing.c: Fix memory leak in decode_signature() in case of error.
Signed-off-by: Diogo Sousa <diogogsousa@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/signing.c1
1 files changed, 1 insertions, 0 deletions
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;