[pve-devel] [PATCH v2 container 1/3] config: snapshot_delete_remove_drive: check for parsed value
Fabian Ebner
f.ebner at proxmox.com
Thu Jan 13 12:04:03 CET 2022
parse_volume is called with noerr=1, so this might be undef instead
of the hash we expect.
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
src/PVE/LXC/Config.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 6c2acd6..32d990c 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -192,7 +192,7 @@ sub __snapshot_delete_remove_drive {
delete $snap->{$remove_drive};
$class->add_unused_volume($snap, $mountpoint->{volume})
- if ($mountpoint->{type} eq 'volume');
+ if $mountpoint && ($mountpoint->{type} eq 'volume');
}
}
--
2.30.2
More information about the pve-devel
mailing list