[pacman-dev] [PATCH 1/5] use alpm_list_free on filelist intersection

Andrew Gregory andrew.gregory.8 at gmail.com
Fri Feb 15 21:02:15 EST 2013


alpm_filelist_intersection returns a list of pointers to internal file_t
struct's, so only the list itself should be freed.

Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
 lib/libalpm/conflict.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 96f2109..1aa653f 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -453,7 +453,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
 					conflicts = add_fileconflict(handle, conflicts, path, p1, p2);
 					if(handle->pm_errno == ALPM_ERR_MEMORY) {
 						FREELIST(conflicts);
-						FREELIST(common_files);
+						alpm_list_free(common_files);
 						return NULL;
 					}
 				}
-- 
1.8.1.3



More information about the pacman-dev mailing list