Skip to content

Commit

Permalink
cgroup: Resource leak (RESOURCE_LEAK)
Browse files Browse the repository at this point in the history
CID 302717 (#2 of 2): Resource leak (RESOURCE_LEAK)
 Variable dirnew going out of scope leaks the storage it points to.

Signed-off-by: Adrian Reber <[email protected]>
  • Loading branch information
adrianreber authored and avagin committed Sep 30, 2020
1 parent 0aad8af commit 91d9c25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions criu/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,7 @@ static int rewrite_cgsets(CgroupEntry *cge, char **controllers, int n_controller
cg->path + dirlen + 1);
if (!cg->path) {
cg->path = prev;
xfree(dirnew);
return -ENOMEM;
}
xfree(prev);
Expand Down

0 comments on commit 91d9c25

Please sign in to comment.