[pacman-dev] [PATCH] Fix a wrong FREELIST usage in add.c

Nagy Gabor ngaba at bibl.u-szeged.hu
Tue Jul 15 06:41:59 EDT 2008


From 4b272f807e2302f1ee184abd8be63f8d02ab47f9 Mon Sep 17 00:00:00 2001
From: Nagy Gabor <ngaba at bibl.u-szeged.hu>
Date: Tue, 15 Jul 2008 12:36:10 +0200
Subject: [PATCH] Fix a wrong FREELIST usage in add.c

The dynamic pmconflict_t must be freed with _alpm_conflict_free.

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

diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 6cf865a..5bf3fcd 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -137,7 +137,8 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
 			if(data) {
 				*data = lp;
 			} else {
-				FREELIST(lp);
+		                alpm_list_free_inner(lp, (alpm_list_fn_free)_alpm_conflict_free);
+		                alpm_list_free(lp);
 			}
 			if(inner) {
 				_alpm_log(PM_LOG_ERROR, _("conflicting packages were found in the target list\n"));
-- 
1.5.6.2





More information about the pacman-dev mailing list