From 07197f23220355132b3220199d5df232f04ce44a Mon Sep 17 00:00:00 2001 From: cjwatson Date: Mon, 14 Sep 2009 19:57:45 +0000 Subject: [PATCH] 2009-09-14 Colin Watson * commands/test.c (get_fileinfo): Return immediately if grub_fs_probe fails. --- ChangeLog | 5 +++++ commands/test.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 42e141472..2d1733ac3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-14 Colin Watson + + * commands/test.c (get_fileinfo): Return immediately if + grub_fs_probe fails. + 2009-09-14 José Martínez * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file. diff --git a/commands/test.c b/commands/test.c index 26df8b5c5..9c813c820 100644 --- a/commands/test.c +++ b/commands/test.c @@ -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;