libalpm/server.c : fix segfault when downloading failed.
The alpm_list_free(complete) needs to be done OUTSIDE the loop walking through the server list. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
f0664fbd93
commit
97fe3d3f5a
1 changed files with 1 additions and 1 deletions
|
@ -410,8 +410,8 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
|
||||||
if(alpm_list_count(complete) == alpm_list_count(files)) {
|
if(alpm_list_count(complete) == alpm_list_count(files)) {
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
alpm_list_free(complete);
|
|
||||||
}
|
}
|
||||||
|
alpm_list_free(complete);
|
||||||
|
|
||||||
return(done ? 0 : -1);
|
return(done ? 0 : -1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue