]> git.proxmox.com Git - pve-common.git/commitdiff
add missing check for undef in is_mounted
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 16 Mar 2016 14:24:05 +0000 (15:24 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 16 Mar 2016 15:47:51 +0000 (16:47 +0100)
src/PVE/ProcFSTools.pm

index 516c0e8b939791a64771df41c36df362e65c7423..eadb4e6cda52abf1dc83a7432d33aaad00cffa00 100644 (file)
@@ -323,6 +323,8 @@ sub is_mounted {
 
     $mountpoint = Cwd::realpath($mountpoint);
 
 
     $mountpoint = Cwd::realpath($mountpoint);
 
+    return 0 if !defined($mountpoint); # path does not exist
+
     my $mounts = parse_proc_mounts();
     return (grep { $_->[1] eq $mountpoint } @$mounts) ? 1 : 0;
 }
     my $mounts = parse_proc_mounts();
     return (grep { $_->[1] eq $mountpoint } @$mounts) ? 1 : 0;
 }