From: Wolfgang Bumiller Date: Tue, 11 Apr 2017 14:42:01 +0000 (+0200) Subject: start: fix error handling when limits fail to apply X-Git-Tag: lxc-2.1.0~162^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1504%2Fhead;p=thirdparty%2Flxc.git start: fix error handling when limits fail to apply (The code was moved here from the child side of the startup without adapting the error case.) Signed-off-by: Wolfgang Bumiller --- diff --git a/src/lxc/start.c b/src/lxc/start.c index fa1ade274..35d2ed5f4 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1263,7 +1263,7 @@ static int lxc_spawn(struct lxc_handler *handler) if (!lxc_list_empty(&handler->conf->limits) && setup_resource_limits(&handler->conf->limits, handler->pid)) { ERROR("failed to setup resource limits for '%s'", name); - return -1; + goto out_delete_net; } if (!cgroup_setup_limits(handler, true)) {