[tracker/miner-fs-refactor: 10/127] libtracker-miner: fix tree disposal



commit 75b0d3be07bc3b75871bd8f4790097c4e2c7ef5b
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Wed Aug 3 17:01:08 2011 +0200

    libtracker-miner: fix tree disposal

 src/libtracker-miner/tracker-indexing-tree.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index b561c0f..3539f1e 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -75,6 +75,12 @@ node_data_free (NodeData *data)
 	g_slice_free (NodeData, data);
 }
 
+static void
+node_free (GNode *node)
+{
+	node_data_free (node->data);
+}
+
 static PatternData *
 pattern_data_new (const gchar *glob_string,
                   guint        type)
@@ -108,10 +114,10 @@ tracker_indexing_tree_finalize (GObject *object)
 	g_list_free (priv->filter_patterns);
 
 	g_node_traverse (priv->config_tree,
-	                 G_IN_ORDER,
+	                 G_POST_ORDER,
 	                 G_TRAVERSE_ALL,
 	                 -1,
-	                 (GNodeTraverseFunc) node_data_free,
+	                 (GNodeTraverseFunc) node_free,
 	                 NULL);
 	g_node_destroy (priv->config_tree);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]