Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_package.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-13 17:36:57 -0500
committerDan McGee <dan@archlinux.org>2011-06-13 17:44:49 -0500
commitbcd442761b56ca6cce07af2364e724271d917a74 (patch)
tree7187fc69888b4f72b97320bb94af99117228df12 /lib/libalpm/be_package.c
parentc5761bfe4121616a19f9a175d28731a60c3c7868 (diff)
Fix memory leak if package sig was invalid
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_package.c')
-rw-r--r--lib/libalpm/be_package.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 0545167e..639179b9 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -273,6 +273,7 @@ pmpkg_t *_alpm_pkg_load_internal(const char *pkgfile, int full,
ret = _alpm_gpgme_checksig(handle, pkgfile, base64_sig);
if((check_sig == PM_PGP_VERIFY_ALWAYS && ret != 0) ||
(check_sig == PM_PGP_VERIFY_OPTIONAL && ret == 1)) {
+ alpm_pkg_free(newpkg);
RET_ERR(PM_ERR_SIG_INVALID, NULL);
}
}