]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxcapi_create: fix leak of tpath when a container already exists
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 15 Apr 2013 02:45:00 +0000 (21:45 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 15 Apr 2013 02:45:00 +0000 (21:45 -0500)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.c

index 27e86f97282e5d2586e0c1c7cf203e3ff52bc0ca..ce751ea417b68a8c466a55b4ce1a83ebc4f07227 100644 (file)
@@ -561,7 +561,7 @@ static bool lxcapi_create(struct lxc_container *c, char *t, char *const argv[])
 
        /* container is already created if we have a config and rootfs.path is accessible */
        if (lxcapi_is_defined(c) && c->lxc_conf && c->lxc_conf->rootfs.path && access(c->lxc_conf->rootfs.path, F_OK) == 0) 
-               return false;
+               goto out;
 
        /* we're going to fork.  but since we'll wait for our child, we
           don't need to lxc_container_get */