From fac4831a091eda447780d5d1e1e572b14ebb0338 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 3 Sep 2016 20:13:35 +1000 Subject: Fix memory leak in remove_notify_needed_optdepends Also add pactest which captures this leak when run under valgrind. Reported-by: Sergey Petrenko Signed-off-by: Allan McRae --- lib/libalpm/remove.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libalpm') diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 45f7c2f4..173dbc69 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -189,6 +189,7 @@ static void remove_notify_needed_optdepends(alpm_handle_t *handle, alpm_list_t * }; EVENT(handle, &event); } + free(optstring); } } } -- cgit v1.2.3-24-g4f1b