From c9c1ec7b44e1418ee907ae1afd9516f425a3b24f Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Fri, 5 Apr 2013 01:44:31 +0400 Subject: [PATCH] cr-dump: fix memory leak in fill_zombies_pids CID 996204 (#1 of 1): Resource leak (RESOURCE_LEAK) 11. leaked_storage: Variable "ch" going out of scope leaks the storage it points to. Signed-off-by: Andrey Vagin Signed-off-by: Pavel Emelyanov --- cr-dump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cr-dump.c b/cr-dump.c index ad06d4f15..f11bfcc1b 100644 --- a/cr-dump.c +++ b/cr-dump.c @@ -1304,6 +1304,8 @@ static int fill_zombies_pids(struct pstree_item *item) BUG_ON(i == nr); } + xfree(ch); + return 0; }