From 6c2d8df669f74a683f82fe43ab42beb68fc57263 Mon Sep 17 00:00:00 2001 From: proski Date: Thu, 26 Jun 2008 16:15:52 +0000 Subject: [PATCH] 2008-06-26 Pavel Roskin * util/biosdisk.c (read_device_map): Don't leave dead map entries for devices failing stat() check. --- ChangeLog | 3 +++ util/biosdisk.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index c9f0bee7c..bbcfb0530 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-06-26 Pavel Roskin + * util/biosdisk.c (read_device_map): Don't leave dead map + entries for devices failing stat() check. + * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use core_path_dev for the core.img path on the target device. diff --git a/util/biosdisk.c b/util/biosdisk.c index d78a69f77..65e5af0ad 100644 --- a/util/biosdisk.c +++ b/util/biosdisk.c @@ -532,6 +532,8 @@ read_device_map (const char *dev_map) if (stat (p, &st) == -1) { + free (map[drive].drive); + map[drive].drive = NULL; grub_util_info ("Cannot stat `%s', skipping", p); continue; }