summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pacman/add.c3
-rw-r--r--src/pacman/callback.c4
-rw-r--r--src/pacman/remove.c3
-rw-r--r--src/pacman/sync.c3
4 files changed, 4 insertions, 9 deletions
diff --git a/src/pacman/add.c b/src/pacman/add.c
index e04707f2..607ac1f0 100644
--- a/src/pacman/add.c
+++ b/src/pacman/add.c
@@ -175,8 +175,7 @@ int pacman_add(alpm_list_t *targets)
break;
}
add_cleanup();
- alpm_list_free_inner(data, free);
- alpm_list_free(data);
+ FREELIST(data);
return(1);
}
alpm_list_free(data);
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 3389ed85..05aec140 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -420,9 +420,7 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent,
printf("%s", (char *)i->data);
}
fflush(stdout);
- alpm_list_free_inner(output, free);
- alpm_list_free(output);
- output = NULL;
+ FREELIST(output);
} else {
on_progress = 1;
}
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 1028d9e8..ae2595a5 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -133,8 +133,7 @@ int pacman_remove(alpm_list_t *targets)
depstring);
free(depstring);
}
- alpm_list_free_inner(data, free);
- alpm_list_free(data);
+ FREELIST(data);
break;
default:
break;
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 9cf781a9..df102af2 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -717,8 +717,7 @@ static int sync_trans(alpm_list_t *targets, int sync_only)
/* Step 4: release transaction resources */
cleanup:
if(data) {
- alpm_list_free_inner(data, free);
- alpm_list_free(data);
+ FREELIST(data);
}
if(alpm_trans_release() == -1) {
fprintf(stderr, _("error: failed to release transaction (%s)\n"),