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 Daniel Kiper
parent 3d8df86d82
commit 2a88564017

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);