summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-12-07 16:45:20 +0100
committerDan McGee <dan@archlinux.org>2007-12-07 16:45:20 +0100
commit97fe3d3f5adecfbf9d6bf201161d743361107e32 (patch)
treeb2c80a219de4c61480808922e1401223c9a614fe /lib
parentf0664fbd93f0002bc568b24de2206e31187fda85 (diff)
downloadpacman-97fe3d3f5adecfbf9d6bf201161d743361107e32.tar.gz
pacman-97fe3d3f5adecfbf9d6bf201161d743361107e32.tar.xz
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/server.c2
1 files changed, 1 insertions, 1 deletions
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);
}