summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-01-13 20:59:57 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-01-13 20:59:57 +0000
commit4232cd9ccac21833160d7391bae9f76276f4383c (patch)
tree49209c800c303bbb0db957ab3ec6804c3491bdd0 /src
parentd42c6bdc492ba985aba5e057326b7dbb4f859772 (diff)
downloadpacman-4232cd9ccac21833160d7391bae9f76276f4383c.tar.xz
fixed a possible memory corruption
Diffstat (limited to 'src')
-rw-r--r--src/pacman/remove.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 678308db..11dc2f8d 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -111,12 +111,13 @@ int pacman_remove(list_t *targets)
if(config->flags & PM_TRANS_FLAG_RECURSE || config->flags & PM_TRANS_FLAG_CASCADE) {
PM_LIST *lp;
/* list transaction targets */
+ i = NULL;
for(lp = alpm_list_first(alpm_trans_getinfo(PM_TRANS_PACKAGES)); lp; lp = alpm_list_next(lp)) {
PM_PKG *pkg = alpm_list_getdata(lp);
i = list_add(i, strdup(alpm_pkg_getinfo(pkg, PM_PKG_NAME)));
}
list_display("\nTargets:", i);
- list_free(i);
+ FREELIST(i);
/* get confirmation */
if(yesno("\nDo you want to remove these packages? [Y/n] ") == 0) {
goto error;