Skip to content

Commit

Permalink
cr-dump: fix memory leak in fill_zombies_pids
Browse files Browse the repository at this point in the history
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 <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
  • Loading branch information
avagin authored and xemul committed Apr 5, 2013
1 parent 50e9478 commit c9c1ec7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cr-dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,8 @@ static int fill_zombies_pids(struct pstree_item *item)
BUG_ON(i == nr);
}

xfree(ch);

return 0;
}

Expand Down

0 comments on commit c9c1ec7

Please sign in to comment.