]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: fix error handling when limits fail to apply 1504/head
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 11 Apr 2017 14:42:01 +0000 (16:42 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 11 Apr 2017 14:43:41 +0000 (16:43 +0200)
(The code was moved here from the child side of the startup
without adapting the error case.)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/lxc/start.c

index fa1ade274d73963e287d032d81078cbc5ee629c5..35d2ed5f40b04dba238c67c2b2b0d45201d45f4c 100644 (file)
@@ -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)) {