diff --git a/criu/cgroup.c b/criu/cgroup.c index 1f6d572573..ee4eba3328 100644 --- a/criu/cgroup.c +++ b/criu/cgroup.c @@ -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);