grub-install: Fix memory leak.

Found by: Coverity scan.
This commit is contained in:
Vladimir Serbinenko 2015-01-26 09:55:30 +01:00
parent c3f5230597
commit 3c6384832b

View file

@ -622,7 +622,10 @@ device_map_check_duplicates (const char *dev_map)
fp = grub_util_fopen (dev_map, "r"); fp = grub_util_fopen (dev_map, "r");
if (! fp) if (! fp)
{
free (d);
return; return;
}
while (fgets (buf, sizeof (buf), fp)) while (fgets (buf, sizeof (buf), fp))
{ {