diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-13 17:36:57 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-13 17:44:49 -0500 |
commit | bcd442761b56ca6cce07af2364e724271d917a74 (patch) | |
tree | 7187fc69888b4f72b97320bb94af99117228df12 | |
parent | c5761bfe4121616a19f9a175d28731a60c3c7868 (diff) | |
download | pacman-bcd442761b56ca6cce07af2364e724271d917a74.tar.xz |
Fix memory leak if package sig was invalid
Signed-off-by: Dan McGee <dan@archlinux.org>
-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); } } |