tracker r1837 - in branches/indexer-split: . src/tracker-indexer/modules



Author: carlosg
Date: Wed Jul  2 16:52:13 2008
New Revision: 1837
URL: http://svn.gnome.org/viewvc/tracker?rev=1837&view=rev

Log:
2008-07-02  Carlos Garnacho  <carlos imendio com>

        * src/tracker-indexer/modules/files.c (tracker_metadata_get_embedded):
        * src/tracker-indexer/modules/evolution.c (get_imap_accounts): Plug
        some leaks.


Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/tracker-indexer/modules/evolution.c
   branches/indexer-split/src/tracker-indexer/modules/files.c

Modified: branches/indexer-split/src/tracker-indexer/modules/evolution.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/modules/evolution.c	(original)
+++ branches/indexer-split/src/tracker-indexer/modules/evolution.c	Wed Jul  2 16:52:13 2008
@@ -337,7 +337,9 @@
         parser.text = account_text_handler;
         parse_context = g_markup_parse_context_new (&parser, 0, &account_context, NULL);
 
-        accounts = g_hash_table_new (g_str_hash, g_str_equal);
+        accounts = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                          (GDestroyNotify) g_free,
+                                          (GDestroyNotify) g_free);
 
         for (l = list; l; l = l->next) {
                 g_markup_parse_context_parse (parse_context, (const gchar *) l->data, -1, NULL);
@@ -347,6 +349,8 @@
                                      account_context.uid);
         }
 
+        g_markup_parse_context_free (parse_context);
+
         g_slist_foreach (list, (GFunc) g_free, NULL);
         g_slist_free (list);
 }

Modified: branches/indexer-split/src/tracker-indexer/modules/files.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/modules/files.c	(original)
+++ branches/indexer-split/src/tracker-indexer/modules/files.c	Wed Jul  2 16:52:13 2008
@@ -50,7 +50,7 @@
 	return "Files";
 }
 
-void
+static void
 tracker_metadata_get_embedded (const char *path,
 			       const char *mimetype,
 			       GHashTable *table)
@@ -70,6 +70,8 @@
 		return;
 	}
 
+        g_free (service_type);
+
 	/* we extract metadata out of process using pipes */
 	argv = g_new0 (gchar *, 4);
 	argv[0] = g_strdup ("tracker-extract");



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