lxcapi_create: fix leak of tpath when a container already exists

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn 2013-04-14 21:45:00 -05:00
parent b4e4ca49c7
commit a741a85d8e

View 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 */