Fix crash in rename with undefined containers

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Stéphane Graber 2014-02-13 13:40:34 -05:00
parent 63d4950fef
commit d693cf93cd

View File

@ -2742,7 +2742,7 @@ static bool lxcapi_rename(struct lxc_container *c, const char *newname)
struct bdev *bdev;
struct lxc_container *newc;
if (!c || !c->name || !c->config_path)
if (!c || !c->name || !c->config_path || !c->lxc_conf)
return false;
bdev = bdev_init(c->lxc_conf->rootfs.path, c->lxc_conf->rootfs.mount, NULL);