From: Stéphane Graber Date: Thu, 13 Feb 2014 18:40:34 +0000 (-0500) Subject: Fix crash in rename with undefined containers X-Git-Tag: lxc-1.0.0.rc1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d693cf93cda8e4d665e840fd583fbf9e62911c09;p=thirdparty%2Flxc.git Fix crash in rename with undefined containers Signed-off-by: Stéphane Graber --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 44e796c29..ee7d4059c 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -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);