ieee1275: Fix segfault in grub-ofpathname

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-28 11:51:39 -08:00 committed by Daniel Kiper
parent 2a88564017
commit 2dc163bf69

View file

@ -46,7 +46,9 @@ int main(int argc, char **argv)
}
of_path = grub_util_devname_to_ofpath (argv[1]);
printf("%s\n", of_path);
if (of_path)
printf ("%s\n", of_path);
free (of_path);