attach: make do_attach() void

Cc: stable-4.0 Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 737a8d85
......@@ -644,7 +644,7 @@ static void lxc_put_attach_clone_payload(struct attach_clone_payload *p)
}
}
__noreturn static int do_attach(struct attach_clone_payload *payload)
__noreturn static void do_attach(struct attach_clone_payload *payload)
{
int lsm_fd, ret;
uid_t new_uid;
......@@ -892,6 +892,7 @@ __noreturn static int do_attach(struct attach_clone_payload *payload)
on_error:
lxc_put_attach_clone_payload(payload);
ERROR("Failed to attach to container");
_exit(EXIT_FAILURE);
}
......@@ -1223,11 +1224,7 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function,
}
}
ret = do_attach(&payload);
if (ret < 0)
ERROR("Failed to exec");
_exit(EXIT_FAILURE);
do_attach(&payload);
}
if (options->attach_flags & LXC_ATTACH_TERMINAL)
......
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