From a741a85d8e241e9ca773f3cd7575d720837fcb51 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Sun, 14 Apr 2013 21:45:00 -0500 Subject: [PATCH] lxcapi_create: fix leak of tpath when a container already exists Signed-off-by: Serge Hallyn --- src/lxc/lxccontainer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */