[tracker/wip/carlosg/tracker-3.0-api-breaks: 89/92] libtracker-direct: Free tasks after g_task_return*
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/tracker-3.0-api-breaks: 89/92] libtracker-direct: Free tasks after g_task_return*
- Date: Wed, 5 Feb 2020 12:33:11 +0000 (UTC)
commit 9703d4014f41a164c4a91f1fad2ab10e91ccc943
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Feb 4 23:35:49 2020 +0100
libtracker-direct: Free tasks after g_task_return*
It was missed in these paths.
src/libtracker-direct/tracker-direct.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-direct/tracker-direct.c b/src/libtracker-direct/tracker-direct.c
index 4db502bf7..0155a1fcc 100644
--- a/src/libtracker-direct/tracker-direct.c
+++ b/src/libtracker-direct/tracker-direct.c
@@ -297,6 +297,8 @@ async_initable_thread_func (GTask *task,
g_task_return_error (task, error);
else
g_task_return_boolean (task, TRUE);
+
+ g_object_unref (task);
}
static void
@@ -643,8 +645,10 @@ tracker_direct_connection_query_async (TrackerSparqlConnection *self,
task_data_query_new (TASK_TYPE_QUERY, sparql),
(GDestroyNotify) task_data_free);
- if (!g_thread_pool_push (priv->select_pool, task, &error))
+ if (!g_thread_pool_push (priv->select_pool, task, &error)) {
g_task_return_error (task, error);
+ g_object_unref (task);
+ }
}
static TrackerSparqlCursor *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]