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:
Chantry Xavier 2007-12-07 09:45:20 -06:00 committed by Dan McGee
parent f0664fbd93
commit 97fe3d3f5a
1 changed files with 1 additions and 1 deletions

View File

@ -410,8 +410,8 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
if(alpm_list_count(complete) == alpm_list_count(files)) {
done = 1;
}
alpm_list_free(complete);
}
alpm_list_free(complete);
return(done ? 0 : -1);
}