[Libosinfo] [PATCH 2/2] media: Pass the source object to GTask new

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


When creating the new GTask in osinfo_media_create_from_location_async,
no source object has been passed. Consequently
search_ppc_bootinfo_callback receives NULL as its source object, causing
warnings when trying to unref it.

Let's just pass the stream as the source object of the GTask in
osinfo_media_create_from_location_async in order to avoid the issue.

The issue has been introduced as part of 29f97cb7648.

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

diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
index b3ea6ab..6bd1f66 100644
--- a/osinfo/osinfo_media.c
+++ b/osinfo/osinfo_media.c
@@ -963,7 +963,7 @@ static void search_ppc_bootinfo_async(GInputStream *stream,
 
     data = g_slice_new0(SearchPPCBootinfoAsyncData);
     data->pvd = pvd;
-    data->res = g_task_new(NULL,
+    data->res = g_task_new(stream,
                            cancellable,
                            callback,
                            user_data);
-- 
2.19.1




More information about the Libosinfo mailing list