mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 12:06:12 +00:00
Fix crash in rename with undefined containers
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
63d4950fef
commit
d693cf93cd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user