[pacman-dev] [PATCH] pacman: correctly free lists

morganamilo morganamilo at gmail.com
Fri Jun 14 01:50:10 UTC 2019


diff --git a/src/pacman/database.c b/src/pacman/database.c
index f3b890ce..7a792bad 100644
--- a/src/pacman/database.c
+++ b/src/pacman/database.c
@@ -105,7 +105,8 @@ static int check_db_missing_deps(alpm_list_t *pkglist)
 		free(depstring);
 		ret++;
 	}
-	FREELIST(data);
+	alpm_list_free_inner(data, (alpm_list_fn_free)alpm_depmissing_free);
+	alpm_list_free(data);
 	return ret;
 }
 
@@ -159,7 +160,8 @@ static int check_db_local_package_conflicts(alpm_list_t *pkglist)
 				conflict->package1, conflict->package2);
 		ret++;
 	}
-	FREELIST(data);
+	alpm_list_free_inner(data, (alpm_list_fn_free)alpm_conflict_free);
+	alpm_list_free(data);
 	return ret;
 }
 
-- 
2.21.0


More information about the pacman-dev mailing list