[tracker/tracker-store] Fixes core dump by double freeing a device in tracker-indexer processor



commit 2ad402c96b0a082dea5288385a9d9d534741a054
Author: Martyn Russell <martyn imendio com>
Date:   Mon Jun 29 13:22:08 2009 +0100

    Fixes core dump by double freeing a device in tracker-indexer processor

 src/tracker-indexer/tracker-processor.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-indexer/tracker-processor.c b/src/tracker-indexer/tracker-processor.c
index d11bcc8..460d8cb 100644
--- a/src/tracker-indexer/tracker-processor.c
+++ b/src/tracker-indexer/tracker-processor.c
@@ -1613,7 +1613,11 @@ mount_point_removed_cb (TrackerStorage *hal,
 	 */
 	l = g_list_find_custom (priv->devices, mp, (GCompareFunc) g_strcmp0);
 
-	if (l) {
+	/* Make sure we don't remove the current device we are
+	 * processing, this is because we do this same clean up later
+	 * in process_device_next() 
+	 */
+	if (l && l != priv->current_device) {
 		g_free (l->data);
 		priv->devices = g_list_delete_link (priv->devices, l);
 	}



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