[tracker] tracker-miner-fs: plug a leak



commit d7a880eaf70bccbff07de76844f8dbe8931db225
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon May 30 17:57:38 2011 +0200

    tracker-miner-fs: plug a leak

 src/miners/fs/tracker-config.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/miners/fs/tracker-config.c b/src/miners/fs/tracker-config.c
index 673ca91..9e68aa8 100644
--- a/src/miners/fs/tracker-config.c
+++ b/src/miners/fs/tracker-config.c
@@ -513,6 +513,7 @@ settings_get_dir_mapping (GVariant *value,
 
 	for (l = dirs; l; l = l->next) {
 		const gchar *path_to_use;
+		gchar *freeme = NULL;
 
 		/* Must be a special dir */
 		if (strcmp (l->data, "&DESKTOP") == 0) {
@@ -532,13 +533,15 @@ settings_get_dir_mapping (GVariant *value,
 		} else if (strcmp (l->data, "&VIDEOS") == 0) {
 			path_to_use = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS);
 		} else {
-			path_to_use = tracker_path_evaluate_name (l->data);
+			freeme = path_to_use = tracker_path_evaluate_name (l->data);
 		}
 
 		if (path_to_use) {
 			g_free (l->data);
 			l->data = g_strdup (path_to_use);
 		}
+
+		g_free (freeme);
 	}
 
 	*result = dirs;



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