From d693cf93cda8e4d665e840fd583fbf9e62911c09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= Date: Thu, 13 Feb 2014 13:40:34 -0500 Subject: [PATCH] Fix crash in rename with undefined containers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- src/lxc/lxccontainer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.2