From: Serge Hallyn Date: Mon, 15 Apr 2013 02:45:00 +0000 (-0500) Subject: lxcapi_create: fix leak of tpath when a container already exists X-Git-Tag: lxc-1.0.0.alpha1~1^2~307 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a741a85d8e241e9ca773f3cd7575d720837fcb51;p=thirdparty%2Flxc.git lxcapi_create: fix leak of tpath when a container already exists Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 27e86f972..ce751ea41 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -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 */