[gnome-documents] miner: more leak fixes and cleanups



commit 70b460679569d8a4fa6a9183bf465dce0fdda819
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Sep 15 21:49:01 2011 -0400

    miner: more leak fixes and cleanups

 src/miner/gd-gdata-miner.c   |    2 ++
 src/miner/gdata-miner-main.c |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/miner/gd-gdata-miner.c b/src/miner/gd-gdata-miner.c
index 9c7bc71..81bdcb8 100644
--- a/src/miner/gd-gdata-miner.c
+++ b/src/miner/gd-gdata-miner.c
@@ -228,6 +228,7 @@ _tracker_utils_ensure_contact_resource (TrackerSparqlConnection *connection,
   g_variant_iter_next (iter, "{ss}", &key, &val);
 
   g_variant_iter_free (iter);
+  g_variant_unref (insert_res);
 
   if (g_strcmp0 (key, "res") == 0)
     {
@@ -331,6 +332,7 @@ _tracker_sparql_connection_ensure_resource (TrackerSparqlConnection *connection,
   g_variant_iter_next (iter, "{ss}", &key, &val);
 
   g_variant_iter_free (iter);
+  g_variant_unref (insert_res);
 
   if (g_strcmp0 (key, "res") == 0)
     {
diff --git a/src/miner/gdata-miner-main.c b/src/miner/gdata-miner-main.c
index 1d6ed95..0d98c6f 100644
--- a/src/miner/gdata-miner-main.c
+++ b/src/miner/gdata-miner-main.c
@@ -99,7 +99,9 @@ miner_refresh_db_ready_cb (GObject *source,
   GError *error = NULL;
 
   gd_gdata_miner_refresh_db_finish (GD_GDATA_MINER (source), res, &error);
+
   refreshing = FALSE;
+  ensure_autoquit_on ();
 
   if (error != NULL)
     {
@@ -110,8 +112,6 @@ miner_refresh_db_ready_cb (GObject *source,
     {
       g_dbus_method_invocation_return_value (invocation, NULL);
     }
-
-  ensure_autoquit_on ();
 }
 
 static void



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