Commit 8b4e6d69 by Tycho Andersen Committed by Stéphane Graber

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 d7e0fb80
...@@ -191,7 +191,8 @@ static void exec_criu(struct criu_opts *opts) ...@@ -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++;
......
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