summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/remove.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 181f4ddd..a622a4f4 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -164,8 +164,10 @@ int remove_commit(pmtrans_t *trans, pmdb_t *db)
for(lp = pm_list_last(info->files); lp; lp = lp->prev) {
int nb = 0;
char *file = lp->data;
- if(_alpm_needbackup(lp->data, info->backup)) {
+ char *md5 =_alpm_needbackup(lp->data, info->backup);
+ if(md5) {
nb = 1;
+ free(md5);
}
if(!nb && trans->type == PM_TRANS_TYPE_UPGRADE) {
/* check noupgrade */