fix segfault in grub-ofpathname
Signed-off-by: Eric Snowberg <[email protected]>
---
util/ieee1275/grub-ofpathname.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/util/ieee1275/grub-ofpathname.c b/util/ieee1275/grub-ofpathname.c
index 8e5d766..300fbdd 100644
--- a/util/ieee1275/grub-ofpathname.c
+++ b/util/ieee1275/grub-ofpathname.c
@@ -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);
--
1.7.1
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel