[tracker/pushplugin] Memory leak fix in Evolution plugin
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/pushplugin] Memory leak fix in Evolution plugin
- Date: Mon, 21 Sep 2009 09:55:13 +0000 (UTC)
commit 94a97eda432d1f4e5821f0ae172f33c88052af6a
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Sep 21 11:53:57 2009 +0200
Memory leak fix in Evolution plugin
src/libtracker-common/tracker-sparql-builder.vala | 1 +
src/plugins/evolution/tracker-evolution-plugin.c | 19 ++++++++++++-------
2 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/src/libtracker-common/tracker-sparql-builder.vala b/src/libtracker-common/tracker-sparql-builder.vala
index 2892f1f..f37e8aa 100644
--- a/src/libtracker-common/tracker-sparql-builder.vala
+++ b/src/libtracker-common/tracker-sparql-builder.vala
@@ -46,6 +46,7 @@ public class Tracker.SparqlBuilder : Object {
}
public void drop_graph (string iri)
+ requires (state == State.UPDATE)
{
str.append ("DROP GRAPH <%s>\n".printf (iri));
}
diff --git a/src/plugins/evolution/tracker-evolution-plugin.c b/src/plugins/evolution/tracker-evolution-plugin.c
index 78ea07e..13e9eab 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.c
+++ b/src/plugins/evolution/tracker-evolution-plugin.c
@@ -374,8 +374,8 @@ process_fields (TrackerSparqlBuilder *sparql, gchar *uid, guint flags,
g_free (email_uri);
g_free (email);
- } else
- g_free (l->data);
+ }
+ g_free (l->data);
}
g_list_free (list);
@@ -460,8 +460,8 @@ process_fields (TrackerSparqlBuilder *sparql, gchar *uid, guint flags,
g_free (email_uri);
g_free (email);
- } else
- g_free (l->data);
+ }
+ g_free (l->data);
}
g_list_free (list);
@@ -964,7 +964,7 @@ introduce_walk_folders_in_folder (TrackerEvolutionPlugin *self,
}
g_queue_push_tail (many_queue,
- queued_set);
+ queued_set);
if (start_handler) {
start_many_handler ();
@@ -981,7 +981,9 @@ introduce_walk_folders_in_folder (TrackerEvolutionPlugin *self,
sqlite3_free (query);
if (iter->child) {
- introduce_walk_folders_in_folder (self, iter->child, store, cdb_r, account_uri, info);
+ introduce_walk_folders_in_folder (self, iter->child,
+ store, cdb_r,
+ account_uri, info);
}
iter = iter->next;
@@ -1539,7 +1541,7 @@ register_client (TrackerEvolutionPlugin *self)
return;
}
- query = "SELECT ?c WHERE { <"DATASOURCE_URN "> nie:contentLastModified ?c }";
+ query = "SELECT ?c WHERE { <" DATASOURCE_URN "> nie:contentLastModified ?c }";
results = tracker_resources_sparql_query (client, query, &error);
@@ -1895,6 +1897,9 @@ name_owner_changed_cb (DBusGProxy *proxy,
}
if (tracker_is_empty_string (old_owner) && !tracker_is_empty_string (new_owner)) {
+ if (!client) {
+ client = tracker_connect (FALSE, G_MAXINT);
+ }
register_client (manager);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]