From df5c0392fab80dd10aecdeda0e2111b197071c8f Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Wed, 4 May 2005 21:22:22 +0000 Subject: fixed a memory leak with md5 sums handling --- lib/libalpm/remove.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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 */ -- cgit v1.2.3-24-g4f1b