mirror of
git://github.com/lxc/lxc
synced 2025-08-31 02:17:58 +00:00
c/r: check that cgroup_num_hierarchies > 0
Otherwise in the error case, we end up subtracting two from the static_args, which would lead to a segfault :) Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
This commit is contained in:
@@ -191,7 +191,8 @@ static void exec_criu(struct criu_opts *opts)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static_args += 2 * cgroup_num_hierarchies();
|
if (cgroup_num_hierarchies() > 0)
|
||||||
|
static_args += 2 * cgroup_num_hierarchies();
|
||||||
|
|
||||||
if (opts->user->verbose)
|
if (opts->user->verbose)
|
||||||
static_args++;
|
static_args++;
|
||||||
|
Reference in New Issue
Block a user