diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-14 00:36:57 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-14 00:44:49 +0200 |
commit | bcd442761b56ca6cce07af2364e724271d917a74 (patch) | |
tree | 7187fc69888b4f72b97320bb94af99117228df12 /lib/libalpm | |
parent | c5761bfe4121616a19f9a175d28731a60c3c7868 (diff) | |
download | pacman-bcd442761b56ca6cce07af2364e724271d917a74.tar.gz pacman-bcd442761b56ca6cce07af2364e724271d917a74.tar.xz |
Fix memory leak if package sig was invalid
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/be_package.c | 1 |
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); } } |