diff --git a/util/grub-install.c b/util/grub-install.c index 7d61c32be..afbc55707 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -622,7 +622,10 @@ device_map_check_duplicates (const char *dev_map) fp = grub_util_fopen (dev_map, "r"); if (! fp) - return; + { + free (d); + return; + } while (fgets (buf, sizeof (buf), fp)) {