From 61137a54d66408c1a8d1d032297a91b42684ea6c Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 26 Sep 2019 15:31:07 +0200 Subject: [PATCH] lio: list_lun: return early if volname cannot be parsed Signed-off-by: Thomas Lamprecht --- PVE/Storage/LunCmd/LIO.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/Storage/LunCmd/LIO.pm b/PVE/Storage/LunCmd/LIO.pm index 3234272..486c606 100644 --- a/PVE/Storage/LunCmd/LIO.pm +++ b/PVE/Storage/LunCmd/LIO.pm @@ -207,6 +207,8 @@ my $list_view = sub { my $object = $params[0]; my $volname = $extract_volname->($scfg, $object); + return undef if !defined($volname); # nothing to search for.. + foreach my $lun (@{$SETTINGS->{target}->{luns}}) { if ($lun->{storage_object} eq "$BACKSTORE/$volname") { return $lun->{index};