[pacman-dev] [PATCH] free makedepends/checkdepends when freeing packages

Dave Reisner dreisner at archlinux.org
Mon Jun 17 11:42:51 UTC 2019


Credit to Andrew for identifying source of the leak.
---
 lib/libalpm/package.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 94716666..dde32175 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -683,6 +683,8 @@ void _alpm_pkg_free(alpm_pkg_t *pkg)
 	alpm_list_free(pkg->backup);
 	free_deplist(pkg->depends);
 	free_deplist(pkg->optdepends);
+	free_deplist(pkg->checkdepends);
+	free_deplist(pkg->makedepends);
 	free_deplist(pkg->conflicts);
 	free_deplist(pkg->provides);
 	alpm_list_free(pkg->removes);
-- 
2.22.0


More information about the pacman-dev mailing list