coverity: don't leak partial_fd

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn 2013-08-20 17:54:19 -05:00
parent ca6973422d
commit a09295f841

View File

@ -1046,14 +1046,14 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
exit(0); exit(0);
} }
if (wait_for_pid(pid) != 0) if (wait_for_pid(pid) != 0)
goto out; goto out_unlock;
/* reload config to get the rootfs */ /* reload config to get the rootfs */
if (c->lxc_conf) if (c->lxc_conf)
lxc_conf_free(c->lxc_conf); lxc_conf_free(c->lxc_conf);
c->lxc_conf = NULL; c->lxc_conf = NULL;
if (!load_config_locked(c, c->configfile)) if (!load_config_locked(c, c->configfile))
goto out; goto out_unlock;
if (!create_run_template(c, tpath, !!(flags & LXC_CREATE_QUIET), argv)) if (!create_run_template(c, tpath, !!(flags & LXC_CREATE_QUIET), argv))
goto out_unlock; goto out_unlock;