summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Van Hoof <philip@codeminded.be>2014-10-27 13:34:43 +0100
committerMartyn Russell <martyn@lanedo.com>2014-11-06 10:33:51 +0000
commit319a164cef69fd89ff324823351c074367560f51 (patch)
treece8c482c3f1739d967de0b3d0ef0f030db1a9037
parent7bc908a0c6344a7995eb861ae3879554bb2d4fcd (diff)
downloadtracker-319a164cef69fd89ff324823351c074367560f51.tar.gz
Take ownership of the GFile in the GPtrArray
https://bugzilla.gnome.org/show_bug.cgi?id=739237
-rw-r--r--src/libtracker-miner/tracker-file-notifier.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 3c47b5221..7e2738533 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -150,7 +150,7 @@ root_data_new (TrackerFileNotifier *notifier,
data = g_new0 (RootData, 1);
data->root = g_object_ref (file);
data->pending_dirs = g_queue_new ();
- data->query_files = g_ptr_array_new ();
+ data->query_files = g_ptr_array_new_with_free_func (g_object_unref);
data->updated_dirs = g_ptr_array_new ();
data->flags = flags;
@@ -416,7 +416,7 @@ file_notifier_add_node_foreach (GNode *node,
if (depth != 0 || file == priv->current_index_root->root)
g_ptr_array_add (priv->current_index_root->query_files,
- canonical);
+ g_object_ref (canonical));
}
return FALSE;