summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-05-04 21:22:22 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-05-04 21:22:22 +0000
commitdf5c0392fab80dd10aecdeda0e2111b197071c8f (patch)
treee66b9b411fed073cbbeb5096b3aedb27ffe69049 /lib/libalpm
parentde5e40bcd8cae8d42602ec718422b59a412c6d49 (diff)
downloadpacman-df5c0392fab80dd10aecdeda0e2111b197071c8f.tar.xz
fixed a memory leak with md5 sums handling
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 */