summaryrefslogtreecommitdiff
path: root/lib
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
parentc5761bfe4121616a19f9a175d28731a60c3c7868 (diff)
downloadpacman-bcd442761b56ca6cce07af2364e724271d917a74.tar.xz
Fix memory leak if package sig was invalid
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-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);
}
}