libalpm: fix alpm_option_set_assumeinstalled
It looks like this function has never actually worked. The current list is never set to NULL after being freed. So the new deps were just appended to the already freed list, leading to a segfault. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
21af798604
commit
0a25548cd0
1 changed files with 1 additions and 0 deletions
|
@ -690,6 +690,7 @@ int SYMEXPORT alpm_option_set_assumeinstalled(alpm_handle_t *handle, alpm_list_t
|
||||||
if(handle->assumeinstalled) {
|
if(handle->assumeinstalled) {
|
||||||
alpm_list_free_inner(handle->assumeinstalled, (alpm_list_fn_free)alpm_dep_free);
|
alpm_list_free_inner(handle->assumeinstalled, (alpm_list_fn_free)alpm_dep_free);
|
||||||
alpm_list_free(handle->assumeinstalled);
|
alpm_list_free(handle->assumeinstalled);
|
||||||
|
handle->assumeinstalled = NULL;
|
||||||
}
|
}
|
||||||
while(deps) {
|
while(deps) {
|
||||||
if(alpm_option_add_assumeinstalled(handle, deps->data) != 0) {
|
if(alpm_option_add_assumeinstalled(handle, deps->data) != 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue