Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2019-10-24 23:38:50 +1000
committerAllan McRae <allan@archlinux.org>2019-10-27 19:05:27 +1000
commitae5cf26b5b5b92c9f68b5b29787e7d636f334c12 (patch)
treef197f4d4cc5459272e9e0cbdc974465ba4d1684a
parentdc55701132abf51de2f4289488f416a4c07afecf (diff)
Fix segfault importing PGP key for pacman -U operations
Use after free. Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--lib/libalpm/be_package.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 0f45c331..5ffea875 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -760,14 +760,14 @@ int SYMEXPORT alpm_pkg_load(alpm_handle_t *handle, const char *filename, int ful
pkg_temp = _alpm_pkg_load_internal(handle, filename, full);
if(pkg_temp) {
packager = pkg_temp->packager;
- _alpm_pkg_free(pkg_temp);
+
} else {
packager = NULL;
}
if(_alpm_key_import(handle, packager, key) == -1) {
fail = 1;
}
- free(packager);
+ _alpm_pkg_free(pkg_temp);
}
}
FREELIST(keys);