]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-06-26 Pavel Roskin <proski@gnu.org>
authorproski <proski@localhost>
Thu, 26 Jun 2008 16:15:52 +0000 (16:15 +0000)
committerproski <proski@localhost>
Thu, 26 Jun 2008 16:15:52 +0000 (16:15 +0000)
* util/biosdisk.c (read_device_map): Don't leave dead map
entries for devices failing stat() check.

ChangeLog
util/biosdisk.c

index c9f0bee7cfcc1e6cfaffe984a0fa49d7e7351ff6..bbcfb05302e6edaa45c71d58ffe766bcb7e81169 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-06-26  Pavel Roskin  <proski@gnu.org>
 
+       * 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.
 
index d78a69f77443439d0c275769d4a9d133b2607940..65e5af0ad574846483d1f734001fcd21afa44468 100644 (file)
@@ -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;
        }