]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix crash in rename with undefined containers
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 13 Feb 2014 18:40:34 +0000 (13:40 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 13 Feb 2014 18:45:51 +0000 (13:45 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxccontainer.c

index 44e796c29d5cd89c6dcfb3fa0868e9361dcc1617..ee7d4059c308229372906cf2ba1d65f495d8dc8b 100644 (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);