summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r--lib/libalpm/trans.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index ecc40a0f..52dbe7a9 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -253,7 +253,8 @@ void _alpm_trans_free(pmtrans_t *trans)
FREELIST(trans->targets);
if(trans->type == PM_TRANS_TYPE_SYNC) {
alpm_list_free_inner(trans->packages, (alpm_list_fn_free)_alpm_sync_free);
- } else {
+ } else if (trans->type == PM_TRANS_TYPE_REMOVE ||
+ trans->type == PM_TRANS_TYPE_REMOVEUPGRADE) {
alpm_list_free_inner(trans->packages, (alpm_list_fn_free)_alpm_pkg_free);
}
alpm_list_free(trans->packages);