From 97fe3d3f5adecfbf9d6bf201161d743361107e32 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Fri, 7 Dec 2007 09:45:20 -0600 Subject: 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 Signed-off-by: Dan McGee --- lib/libalpm/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c index 8aa5a45b..384df7c6 100644 --- a/lib/libalpm/server.c +++ b/lib/libalpm/server.c @@ -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); } -- cgit v1.2.3-24-g4f1b