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 authored and Daniel Kiper committed 2017-12-06 12:55:55 +01:00
1 parent 2a88564017
commit 2dc163bf69
1 file changed
+3 -1
+3 -1
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);