1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-03-01 01:41:52 -05:00

Fix memory leak if package sig was invalid

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-06-13 17:36:57 -05:00
parent c5761bfe41
commit bcd442761b

View File

@ -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);
}
}