get_bandwidt_limits: ignore 'undef' as storage

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@proxmox.com>
This commit is contained in:
Stoiko Ivanov
2019-04-05 16:33:34 +02:00
committed by Thomas Lamprecht
parent e638b21312
commit 396aedff95

View File

@ -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;