summaryrefslogtreecommitdiff
path: root/src/libtracker-direct
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2018-09-09 00:39:24 +0200
committerCarlos Garnacho <carlosg@gnome.org>2018-09-09 13:24:07 +0200
commitb0318ec6a68b44c5cdc99cf0dfb86d33a02eacd4 (patch)
treeef6df8942c873bba2038a72727f040ccff4a9783 /src/libtracker-direct
parent3b7ed345c276aada49a2f95279eb6ac496ebc530 (diff)
downloadtracker-b0318ec6a68b44c5cdc99cf0dfb86d33a02eacd4.tar.gz
libtracker-direct: Plug leaks
Diffstat (limited to 'src/libtracker-direct')
-rw-r--r--src/libtracker-direct/tracker-direct.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libtracker-direct/tracker-direct.c b/src/libtracker-direct/tracker-direct.c
index f4fccf1ea..326906e44 100644
--- a/src/libtracker-direct/tracker-direct.c
+++ b/src/libtracker-direct/tracker-direct.c
@@ -182,6 +182,8 @@ query_thread_pool_func (gpointer data,
g_task_return_pointer (task, cursor, g_object_unref);
else
g_task_return_error (task, error);
+
+ g_object_unref (task);
}
static void
@@ -401,6 +403,7 @@ tracker_direct_connection_finalize (GObject *object)
g_clear_object (&priv->journal);
g_clear_object (&priv->ontology);
g_clear_object (&priv->data_manager);
+ g_clear_object (&priv->namespace_manager);
G_OBJECT_CLASS (tracker_direct_connection_parent_class)->finalize (object);
}
@@ -484,6 +487,7 @@ tracker_direct_connection_query (TrackerSparqlConnection *self,
g_mutex_lock (&priv->mutex);
query = tracker_sparql_query_new (priv->data_manager, sparql);
cursor = TRACKER_SPARQL_CURSOR (tracker_sparql_query_execute_cursor (query, error));
+ g_object_unref (query);
if (cursor)
tracker_sparql_cursor_set_connection (cursor, self);
g_mutex_unlock (&priv->mutex);