[tracker] libtracker-miner: Fix crash and memory leak in crawler



commit 79d0e053e9343893b9171c36e4e783c0dce38065
Author: Jürg Billeter <j bitron ch>
Date:   Mon Sep 14 10:22:01 2009 +0200

    libtracker-miner: Fix crash and memory leak in crawler

 src/libtracker-miner/tracker-crawler.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-crawler.c b/src/libtracker-miner/tracker-crawler.c
index d8eaeeb..407d77b 100644
--- a/src/libtracker-miner/tracker-crawler.c
+++ b/src/libtracker-miner/tracker-crawler.c
@@ -446,12 +446,16 @@ enumerator_data_process (EnumeratorData *ed)
 
 	g_hash_table_iter_init (&iter, ed->children);
 
+	children = NULL;
 	while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &cd)) {
 		children = g_list_prepend (children, cd->child);
 	}
 
 	g_signal_emit (crawler, signals[CHECK_DIRECTORY_CONTENTS], 0, ed->parent, children, &use);
 
+	g_list_free (children);
+	children = NULL;
+
 	if (!use) {
 		/* Directory was ignored based on its content */
 		crawler->private->directories_ignored++;



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