Commit 9c40b2d9 by Tycho Andersen

execute: account for -o path option count

This always works fine... until your exec() fails and you try to go and free it, you've overwritten the allocator's metadata (and potentially other stuff) and it fails. Signed-off-by: 's avatarTycho Andersen <tycho@tycho.ws>
parent b2efeb0b
......@@ -57,6 +57,9 @@ static int execute_start(struct lxc_handler *handler, void* data)
if (lxc_log_has_valid_level())
argc_add += 2;
if (current_config->logfd != -1 || lxc_log_fd != -1)
argc_add += 2;
argv = malloc((argc + argc_add) * sizeof(*argv));
if (!argv) {
SYSERROR("Allocating init args failed");
......
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