[lxc-devel] [PATCH] Fix destroy() crash when no config is loaded
Stéphane Graber
stgraber at ubuntu.com
Fri Jan 24 03:02:00 UTC 2014
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
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 1520cd3..fbf0824 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -1957,7 +1957,7 @@ static bool lxcapi_destroy(struct lxc_container *c)
goto out;
}
- if (!am_unpriv() && c->lxc_conf->rootfs.path && c->lxc_conf->rootfs.mount) {
+ if (!am_unpriv() && c->lxc_conf && c->lxc_conf->rootfs.path && c->lxc_conf->rootfs.mount) {
r = bdev_init(c->lxc_conf->rootfs.path, c->lxc_conf->rootfs.mount, NULL);
if (r) {
if (r->ops->destroy(r) < 0) {
--
1.8.5.3
More information about the lxc-devel
mailing list