mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 12:37:35 +00:00
Fix destroy() crash when no config is loaded
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
068b3d0431
commit
e8ff96bbf8
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user