diff options
author | Cole Robinson <crobinso@redhat.com> | 2013-02-08 13:37:53 -0500 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2013-02-11 16:11:56 +0100 |
commit | e17fc3a461a70c7a2a881d48eb2d79d4b852c050 (patch) | |
tree | 3237eb6927ffedd1f4b4b9d87fa2203e36e8f925 | |
parent | 457be89fac6543d00b21fde431479c16e8034e27 (diff) |
osinfo-detect: Fix segfault with non bootable media
With a movie DVD in my drive:
$ osinfo-detect -f env /dev/cdrom
OSINFO_BOOTABLE=0
** (osinfo-detect:24211): CRITICAL **: osinfo_db_identify_media: assertion `OSINFO_IS_MEDIA(media)' failed
(osinfo-detect:24211): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
Segmentation fault (core dumped)
We weren't exiting after detecting the media as non bootable.
https://bugzilla.redhat.com/show_bug.cgi?id=901910
-rw-r--r-- | tools/osinfo-detect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c index 1262783..0f837de 100644 --- a/tools/osinfo-detect.c +++ b/tools/osinfo-detect.c @@ -238,10 +238,10 @@ gint main(gint argc, gchar **argv) g_printerr(_("Error parsing media: %s\n"), error->message); ret = -3; - goto EXIT; } else { print_bootable(FALSE); } + goto EXIT; } else { print_bootable(TRUE); } |