Fix segfault importing PGP key for pacman -U operations
Use after free. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
dc55701132
commit
ae5cf26b5b
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue