[Libosinfo] [PATCH 1/2] media: Don't try to unref a NULL entry

Fabiano Fidêncio fidencio at redhat.com
Thu Dec 20 13:41:53 UTC 2018


In case g_file_read_finish() fails, the stream will always be NULL.
The issue has been introduced as part of f977527c82.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
Pushed as a build fix
---
 osinfo/osinfo_media.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
index 15feb5b..b3ea6ab 100644
--- a/osinfo/osinfo_media.c
+++ b/osinfo/osinfo_media.c
@@ -1242,7 +1242,6 @@ static void on_location_read(GObject *source,
     stream = g_file_read_finish(G_FILE(source), res, &error);
     if (error != NULL) {
         g_prefix_error(&error, _("Failed to open file"));
-        g_object_unref(stream);
         g_task_return_error(data->res, error);
         create_from_location_async_data_free(data);
 
-- 
2.19.1




More information about the Libosinfo mailing list