From 840e3797a5853ca7a6bc701b23719956f8fecd18 Mon Sep 17 00:00:00 2001 From: Wolfgang Link Date: Wed, 16 May 2018 09:08:06 +0200 Subject: [PATCH] cifs: fix uninitialized warning in check_connection otherwise this spams the log when check_connection runs into a timeout. --- PVE/Storage/CIFSPlugin.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/CIFSPlugin.pm b/PVE/Storage/CIFSPlugin.pm index 1670a5c..724fb1f 100644 --- a/PVE/Storage/CIFSPlugin.pm +++ b/PVE/Storage/CIFSPlugin.pm @@ -218,7 +218,8 @@ sub check_connection { }; if (my $err = $@) { - die "$out_str\n" if ($out_str =~ m/NT_STATUS_ACCESS_DENIED/); + die "$out_str\n" if defined($out_str) && + ($out_str =~ m/NT_STATUS_ACCESS_DENIED/); return 0; }