From 8caded76418d6e87d70699197784fef0a6a36c32 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sat, 22 Oct 2022 22:36:30 +0200 Subject: libtracker-sparql/bus: Plug GTask leak The task was not being unreferenced after dispatching, thus leaking a reference on its cursor source object, thus preventing it from being implicitly closed if the application does not do an explicit tracker_sparql_cursor_close(). Fixes: 4098bbda20 (libtracker-sparql: Reimplement all bus connection objects) Closes: https://gitlab.gnome.org/GNOME/tracker/-/issues/383 --- src/libtracker-sparql/bus/tracker-bus-cursor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libtracker-sparql/bus/tracker-bus-cursor.c b/src/libtracker-sparql/bus/tracker-bus-cursor.c index fab995d60..2b463299c 100644 --- a/src/libtracker-sparql/bus/tracker-bus-cursor.c +++ b/src/libtracker-sparql/bus/tracker-bus-cursor.c @@ -325,6 +325,7 @@ tracker_bus_cursor_next_async (TrackerSparqlCursor *cursor, task = g_task_new (cursor, cancellable, cb, user_data); g_task_run_in_thread (task, next_in_thread); + g_object_unref (task); } static gboolean -- cgit v1.2.1