Revision: 2596
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2596
Author:   cjwatson
Date:     2009-09-14 19:57:45 +0000 (Mon, 14 Sep 2009)
Log Message:
-----------
2009-09-14  Colin Watson  <[email protected]>

        * commands/test.c (get_fileinfo): Return immediately if
        grub_fs_probe fails.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/commands/test.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog       2009-09-14 15:38:30 UTC (rev 2595)
+++ trunk/grub2/ChangeLog       2009-09-14 19:57:45 UTC (rev 2596)
@@ -1,3 +1,8 @@
+2009-09-14  Colin Watson  <[email protected]>
+
+       * commands/test.c (get_fileinfo): Return immediately if
+       grub_fs_probe fails.
+
 2009-09-14  José Martínez  <[email protected]>
 
        * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.

Modified: trunk/grub2/commands/test.c
===================================================================
--- trunk/grub2/commands/test.c 2009-09-14 15:38:30 UTC (rev 2595)
+++ trunk/grub2/commands/test.c 2009-09-14 19:57:45 UTC (rev 2596)
@@ -88,6 +88,13 @@
       }
 
     fs = grub_fs_probe (dev);
+    if (! fs)
+      {
+       grub_free (device_name);
+       grub_device_close (dev);
+       return;
+      }
+
     pathname = grub_strchr (path, ')');
     if (! pathname)
       pathname = path;



Reply via email to