summaryrefslogtreecommitdiff
path: root/src/libtracker-sparql
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2022-10-22 22:36:30 +0200
committerCarlos Garnacho <carlosg@gnome.org>2022-10-23 13:46:25 +0200
commit8caded76418d6e87d70699197784fef0a6a36c32 (patch)
tree74cbc8da9f4d27adef6e3fa4fd09731ca3d6cc20 /src/libtracker-sparql
parent9b331935782214c7c46b26ee6916d3d423aa8116 (diff)
downloadtracker-8caded76418d6e87d70699197784fef0a6a36c32.tar.gz
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
Diffstat (limited to 'src/libtracker-sparql')
-rw-r--r--src/libtracker-sparql/bus/tracker-bus-cursor.c1
1 files changed, 1 insertions, 0 deletions
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