Commit a741a85d by Serge Hallyn

lxcapi_create: fix leak of tpath when a container already exists

parent b4e4ca49
...@@ -561,7 +561,7 @@ static bool lxcapi_create(struct lxc_container *c, char *t, char *const argv[]) ...@@ -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 */ /* 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) 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 /* we're going to fork. but since we'll wait for our child, we
don't need to lxc_container_get */ don't need to lxc_container_get */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment