[pve-devel] [PATCH v2 storage] fix use of uninitialized value in parse_ceph_config

David Limbeck d.limbeck at proxmox.com
Thu Jan 3 09:44:59 CET 2019


Signed-off-by: David Limbeck <d.limbeck at proxmox.com>
---
v2:
  early return as Wolfgang suggested

 PVE/CephConfig.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/CephConfig.pm b/PVE/CephConfig.pm
index 5b2d19e..b420fcc 100644
--- a/PVE/CephConfig.pm
+++ b/PVE/CephConfig.pm
@@ -14,6 +14,7 @@ sub parse_ceph_config {
     my ($filename, $raw) = @_;
 
     my $cfg = {};
+    return $cfg if !defined($raw);
 
     my @lines = split /\n/, $raw;
 
-- 
2.11.0





More information about the pve-devel mailing list