diff options
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r-- | lib/libalpm/trans.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 243cdc10..ef568411 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -240,7 +240,12 @@ void _alpm_trans_free(pmtrans_t *trans) } if(trans->type == PM_TRANS_TYPE_SYNC) { - alpm_list_free_inner(trans->packages, (alpm_list_fn_free)_alpm_sync_free); + alpm_list_t *i; + for(i = trans->packages; i; i = i->next) { + pmpkg_t *pkg = i->data; + alpm_list_free(pkg->removes); + pkg->removes = NULL; + } } else { alpm_list_free_inner(trans->packages, (alpm_list_fn_free)_alpm_pkg_free); } |