[pve-devel] [PATCH storage 1/2] get_bandwidt_limits: ignore 'undef' as storage
Stoiko Ivanov
s.ivanov at proxmox.com
Fri Apr 5 16:33:34 CEST 2019
If one of the storages passed in $storage_list was not defined
get_bandwidth_limit died (see [0], of an occurence of this).
This patch changes the behavior to ignore undef as storage instead.
[0] https://pve.proxmox.com/pipermail/pve-devel/2019-April/036515.html
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
PVE/Storage.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index 0559538..eb5e86f 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -1646,6 +1646,7 @@ sub get_bandwidth_limit {
my %done;
foreach my $storage (@$storage_list) {
+ next if !defined($storage);
# Avoid duplicate checks:
next if $done{$storage};
$done{$storage} = 1;
--
2.11.0
More information about the pve-devel
mailing list