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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux