Unverified Commit 27cd0177 by Christian Brauner Committed by Stéphane Graber

start: remove dead variable

non-functional changes Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 77e7b5e2
...@@ -1142,7 +1142,7 @@ static int lxc_spawn(struct lxc_handler *handler) ...@@ -1142,7 +1142,7 @@ static int lxc_spawn(struct lxc_handler *handler)
bool wants_to_map_ids; bool wants_to_map_ids;
int saved_ns_fd[LXC_NS_MAX]; int saved_ns_fd[LXC_NS_MAX];
struct lxc_list *id_map; struct lxc_list *id_map;
int failed_before_rename = 0, preserve_mask = 0; int preserve_mask = 0;
bool cgroups_connected = false; bool cgroups_connected = false;
id_map = &handler->conf->id_map; id_map = &handler->conf->id_map;
...@@ -1256,15 +1256,11 @@ static int lxc_spawn(struct lxc_handler *handler) ...@@ -1256,15 +1256,11 @@ static int lxc_spawn(struct lxc_handler *handler)
goto out_delete_net; goto out_delete_net;
} }
if (lxc_sync_wake_child(handler, LXC_SYNC_STARTUP)) { if (lxc_sync_wake_child(handler, LXC_SYNC_STARTUP))
failed_before_rename = 1;
goto out_delete_net; goto out_delete_net;
}
if (lxc_sync_wait_child(handler, LXC_SYNC_CONFIGURE)) { if (lxc_sync_wait_child(handler, LXC_SYNC_CONFIGURE))
failed_before_rename = 1;
goto out_delete_net; goto out_delete_net;
}
if (!cgroup_create_legacy(handler)) { if (!cgroup_create_legacy(handler)) {
ERROR("Failed to setup legacy cgroups for container \"%s\".", name); ERROR("Failed to setup legacy cgroups for container \"%s\".", name);
...@@ -1281,9 +1277,6 @@ static int lxc_spawn(struct lxc_handler *handler) ...@@ -1281,9 +1277,6 @@ static int lxc_spawn(struct lxc_handler *handler)
if (!cgroup_chown(handler)) if (!cgroup_chown(handler))
goto out_delete_net; goto out_delete_net;
if (failed_before_rename)
goto out_delete_net;
handler->netnsfd = lxc_preserve_ns(handler->pid, "net"); handler->netnsfd = lxc_preserve_ns(handler->pid, "net");
if (handler->netnsfd < 0) { if (handler->netnsfd < 0) {
ERROR("Failed to preserve network namespace"); ERROR("Failed to preserve network namespace");
......
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