[evolution-data-server] Fix possible access to already freed memory in camel-store-summary.c



commit 2c5c78caf44dd17d1c014974a4ea8e6046034ceb
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jan 22 17:14:54 2010 +0100

    Fix possible access to already freed memory in camel-store-summary.c

 camel/camel-store-summary.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-store-summary.c b/camel/camel-store-summary.c
index 4515af0..48eb2bd 100644
--- a/camel/camel-store-summary.c
+++ b/camel/camel-store-summary.c
@@ -967,6 +967,7 @@ store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *info, gint type, co
 		g_hash_table_remove(s->folders_path, (gchar *)camel_store_info_path(s, info));
 		g_free(info->path);
 		g_free(info->uri);
+		info->uri = NULL;
 		info->path = g_strdup(str);
 		g_hash_table_insert(s->folders_path, (gchar *)camel_store_info_path(s, info), info);
 		s->flags |= CAMEL_STORE_SUMMARY_DIRTY;
@@ -986,6 +987,8 @@ store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *info, gint type, co
 		}
 		g_free(info->path);
 		info->path = v;
+		g_free (info->uri);
+		info->uri = NULL;
 		g_hash_table_insert(s->folders_path, (gchar *)camel_store_info_path(s, info), info);
 		CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
 		break;



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