From 7743527799ed8acc18feef8dfe97961aec0cc5c2 Mon Sep 17 00:00:00 2001 From: fzielcke Date: Sat, 25 Jul 2009 09:30:25 +0000 Subject: [PATCH] 2009-07-25 Felix Zielcke * kern/file.c (grub_file_open): Fix an error check. --- ChangeLog | 4 ++++ kern/file.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4381e3cc4..bffd6c16c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-07-25 Felix Zielcke + + * kern/file.c (grub_file_open): Fix an error check. + 2009-07-24 Vladimir Serbinenko * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when diff --git a/kern/file.c b/kern/file.c index 9b56b88e4..362cf1d7f 100644 --- a/kern/file.c +++ b/kern/file.c @@ -60,8 +60,8 @@ grub_file_open (const char *name) char *file_name; device_name = grub_file_get_device_name (name); - if (grub_errno) - return 0; + if (! device_name) + goto fail; /* Get the file part of NAME. */ file_name = grub_strchr (name, ')');