[pacman-dev] [PATCH] Fix a minor memleak

Nagy Gabor ngaba at bibl.u-szeged.hu
Tue Jul 21 09:58:33 EDT 2009


>From 5979ea01d2f4217c1b199c675a7a3d4c728da9fa Mon Sep 17 00:00:00 2001
From: Nagy Gabor <ngaba at bibl.u-szeged.hu>
Date: Tue, 21 Jul 2009 15:50:08 +0200
Subject: [PATCH] Fix a minor memleak

Signed-off-by: Nagy Gabor <ngaba at bibl.u-szeged.hu>
---
 lib/libalpm/remove.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index e370909..aa6a5cc 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -277,6 +277,7 @@ static void unlink_file(pmpkg_t *info, char *filename, pmtrans_t *trans)
 		if(pkghash) {
 			if(trans->flags & PM_TRANS_FLAG_NOSAVE) {
 				_alpm_log(PM_LOG_DEBUG, "transaction is set to NOSAVE, not backing up '%s'\n", file);
+				FREE(pkghash);
 			} else {
 				char *filehash = alpm_compute_md5sum(file);
 				int cmp = strcmp(filehash,pkghash);
-- 
1.6.0.3





More information about the pacman-dev mailing list