From bcd442761b56ca6cce07af2364e724271d917a74 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 13 Jun 2011 17:36:57 -0500 Subject: Fix memory leak if package sig was invalid Signed-off-by: Dan McGee --- lib/libalpm/be_package.c | 1 + 1 file changed, 1 insertion(+) 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); } } -- cgit v1.2.3-2-g168b