tracker r2347 - in trunk: . src/trackerd



Author: carlosg
Date: Thu Oct  9 13:31:36 2008
New Revision: 2347
URL: http://svn.gnome.org/viewvc/tracker?rev=2347&view=rev

Log:
2008-10-09  Carlos Garnacho  <carlos imendio com>

        * src/trackerd/tracker-db.c (tracker_db_search_text)
        (tracker_db_get_metadata_field):
        * src/trackerd/tracker-metadata.c (tracker_metadata_get):
        * src/trackerd/tracker-query-tree.c (tracker_query_tree_finalize)
        (tracker_query_tree_get_hits) (tracker_query_tree_get_hit_counts):
        Plug leaks everywhere.


Modified:
   trunk/ChangeLog
   trunk/src/trackerd/tracker-db.c
   trunk/src/trackerd/tracker-metadata.c
   trunk/src/trackerd/tracker-query-tree.c

Modified: trunk/src/trackerd/tracker-db.c
==============================================================================
--- trunk/src/trackerd/tracker-db.c	(original)
+++ trunk/src/trackerd/tracker-db.c	Thu Oct  9 13:31:36 2008
@@ -270,7 +270,6 @@
 	TrackerDBPrivate    *private;
 	TrackerQueryTree    *tree;
 	TrackerDBResultSet  *result_set, *result;
-	gchar		   **array;
 	GArray		    *hits;
 	gint		     count;
 	gboolean	     detailed_emails = FALSE, detailed_apps = FALSE;
@@ -287,11 +286,6 @@
 	private = g_static_private_get (&private_key);
 	g_return_val_if_fail (private != NULL, NULL);
 
-	array = tracker_parser_text_into_array (search_string,
-						private->language,
-						tracker_config_get_max_word_length (private->config),
-						tracker_config_get_min_word_length (private->config));
-
 	services = tracker_db_create_array_of_services (service, FALSE);
 	/* FIXME: Do we need both index and services here? We used to have it */
 	tree = tracker_query_tree_new (search_string,
@@ -420,6 +414,7 @@
 		}
 
 		g_slist_free (words);
+		g_slist_free (duds);
 	}
 
 	g_object_unref (tree);
@@ -1739,6 +1734,7 @@
 
 		tracker_field_data_set_where_field (field_data, where_field);
 		g_free (where_field);
+		g_free (alias);
 	}
 
 	return field_data;

Modified: trunk/src/trackerd/tracker-metadata.c
==============================================================================
--- trunk/src/trackerd/tracker-metadata.c	(original)
+++ trunk/src/trackerd/tracker-metadata.c	Thu Oct  9 13:31:36 2008
@@ -226,6 +226,8 @@
 
 	dbus_g_method_return (context, values);
 	g_strfreev (values);
+	g_free (service_id);
+	g_free (service_result);
 
 	tracker_dbus_request_success (request_id);
 }

Modified: trunk/src/trackerd/tracker-query-tree.c
==============================================================================
--- trunk/src/trackerd/tracker-query-tree.c	(original)
+++ trunk/src/trackerd/tracker-query-tree.c	Thu Oct  9 13:31:36 2008
@@ -186,6 +186,7 @@
 
 	tree_node_free (priv->tree);
 	g_free (priv->query_str);
+	g_array_free (priv->services, TRUE);
 
 	G_OBJECT_CLASS (tracker_query_tree_parent_class)->finalize (object);
 }
@@ -793,6 +794,8 @@
 		g_array_remove_range (array, limit, array->len - limit);
 	}
 
+	g_hash_table_destroy (table);
+
 	return array;
 }
 
@@ -876,6 +879,8 @@
 	}
 
 	g_hash_table_foreach (table, (GHFunc) get_hit_count_foreach, counts);
+
+	g_hash_table_destroy (table);
 	g_array_free (hits, TRUE);
 
 	return counts;



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