]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-09-14 Colin Watson <cjwatson@ubuntu.com>
authorcjwatson <cjwatson@localhost>
Mon, 14 Sep 2009 19:57:45 +0000 (19:57 +0000)
committercjwatson <cjwatson@localhost>
Mon, 14 Sep 2009 19:57:45 +0000 (19:57 +0000)
* commands/test.c (get_fileinfo): Return immediately if
grub_fs_probe fails.

ChangeLog
commands/test.c

index 42e141472c6e3737f508c6f91a512ea6f904bc92..2d1733ac3ea496b477f820ab7b1e3bf052fd8735 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-14  Colin Watson  <cjwatson@ubuntu.com>
+
+       * commands/test.c (get_fileinfo): Return immediately if
+       grub_fs_probe fails.
+
 2009-09-14  José Martínez  <xosemp@gmail.com>
 
        * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
index 26df8b5c5b73fe4be7264a6e72f1a59a47a47a23..9c813c82047b9c0da876a9bf7e3c0d0e7ee2585c 100644 (file)
@@ -88,6 +88,13 @@ test_parse (char **args, int *argn, int argc)
       }
 
     fs = grub_fs_probe (dev);
+    if (! fs)
+      {
+       grub_free (device_name);
+       grub_device_close (dev);
+       return;
+      }
+
     pathname = grub_strchr (path, ')');
     if (! pathname)
       pathname = path;