Commit ae5cf26b authored by Allan McRae's avatar Allan McRae
Browse files

Fix segfault importing PGP key for pacman -U operations



Use after free.

Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
parent dc557011
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment