mount: Add message when the target path does not exist
authorFelipe Sateler <fsateler@gmail.com>
Thu, 7 Sep 2017 19:12:35 +0000 (16:12 -0300)
committerFelipe Sateler <fsateler@gmail.com>
Thu, 7 Sep 2017 19:16:47 +0000 (16:16 -0300)
Fixes: #6760

src/mount/mount-tool.c

index 3c974ad..2e282ef 100644 (file)
@@ -1004,6 +1004,11 @@ static int action_umount(
 
                 p = canonicalize_file_name(a);
 
+                if (!p) {
+                        r2 = log_error_errno(errno, "Failed to canonicalize path %s: %m", argv[i]);
+                        continue;
+                }
+
                 if (stat(p, &st) < 0)
                         return log_error_errno(errno, "Can't stat %s: %m", p);