grub-install: Fix memory leak

Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Eric Snowberg 2017-11-27 09:12:49 -08:00 committed by Vincent Batts
parent 4aeba29569
commit f7d95b92f3

View file

@ -1472,6 +1472,7 @@ main (int argc, char *argv[])
{
grub_util_fprint_full_disk_name (load_cfg_f, g, dev);
fprintf (load_cfg_f, " ");
free (g);
}
if (dev != grub_dev)
grub_device_close (dev);