Commit 09e80d0c by Tycho Andersen

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: 's avatarTycho Andersen <tycho.andersen@canonical.com>
parent a0c91fcc
...@@ -191,6 +191,7 @@ static void exec_criu(struct criu_opts *opts) ...@@ -191,6 +191,7 @@ static void exec_criu(struct criu_opts *opts)
return; return;
} }
if (cgroup_num_hierarchies() > 0)
static_args += 2 * cgroup_num_hierarchies(); static_args += 2 * cgroup_num_hierarchies();
if (opts->user->verbose) if (opts->user->verbose)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment