[pve-devel] [PATCH container 1/3] config: snapshot_delete_remove_drive: check for parsed value
Fabian Ebner
f.ebner at proxmox.com
Thu Aug 5 09:19:56 CEST 2021
to avoid a potential warning. parse_volume is called with noerr=1, so this might
be undef instead of a hash.
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 8557e4c..f832f90 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