[evolution-patches] [Camel - GW/local] Memory leak fixes.
- From: "Veerapuram Varadhan" <vvaradhan novell com>
- To: <evolution-patches gnome org>
- Subject: [evolution-patches] [Camel - GW/local] Memory leak fixes.
- Date: Thu, 22 Sep 2005 07:50:10 -0600
Hi,
Attached is a patch that fixes few memory leaks that I found in my
valgrind runs.
Let me know you review comments.
TIA,
V. Varadhan
P.S:- It would be good to put this in 2.4.1 as well.
? depcomp
? gtk-doc.make
? iconv-detect.h
? mem-leaks-fix-gw-mail.diff
? calendar/config.guess
? calendar/config.sub
? calendar/depcomp
? calendar/install-sh
? calendar/ltmain.sh
? calendar/missing
? calendar/mkinstalldirs
? calendar/ylwrap
? calendar/tests/ecal/test-recur
? camel/camel-mime-tables.c
? libedataserverui/test-contact-store
? libedataserverui/test-name-selector
? servers/exchange/Makefile
? servers/exchange/Makefile.in
? servers/exchange/lib/Makefile
? servers/exchange/lib/Makefile.in
? servers/exchange/lib/e2k-marshal.c
? servers/exchange/lib/e2k-marshal.h
? servers/exchange/lib/e2k-propnames.c
? servers/exchange/lib/e2k-propnames.h
? servers/exchange/lib/e2k-proptags.h
? servers/exchange/storage/Makefile
? servers/exchange/storage/Makefile.in
? servers/exchange/storage/e-shell-marshal.c
? servers/exchange/storage/e-shell-marshal.h
? servers/exchange/storage/libexchange-storage-1.2.pc
? servers/exchange/storage/libexchange-storage.pc
? servers/exchange/xntlm/Makefile
? servers/exchange/xntlm/Makefile.in
? src/GNOME_Evolution_DataServer_1.2.server
Index: camel/providers/groupwise/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/ChangeLog,v
retrieving revision 1.114
diff -u -p -r1.114 ChangeLog
--- camel/providers/groupwise/ChangeLog 18 Sep 2005 18:21:10 -0000 1.114
+++ camel/providers/groupwise/ChangeLog 22 Sep 2005 13:43:25 -0000
@@ -1,3 +1,11 @@
+2005-09-22 Veerapuram Varadhan <vvaradhan novell com>
+ * camel-groupwise-folder.c: (camel_gw_folder_new)
+ Memory leak fixes.
+
+ * camel-groupwise-store.c: (groupwise_store_construct)
+ (camel_groupwise_store_finalize): Memory leak fixes, use
+ g_hash_table_new_full instead of g_hash_table_new.
+
2005-09-18 Parthasarathi Susarla <sparthasarathi novell com>
* camel-groupwise-folder.c: (groupwise_refresh_info):
Index: camel/providers/groupwise/camel-groupwise-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-folder.c,v
retrieving revision 1.96
diff -u -p -r1.96 camel-groupwise-folder.c
--- camel/providers/groupwise/camel-groupwise-folder.c 18 Sep 2005 18:21:10 -0000 1.96
+++ camel/providers/groupwise/camel-groupwise-folder.c 22 Sep 2005 13:43:25 -0000
@@ -718,6 +718,7 @@ camel_gw_folder_new(CamelStore *store, c
journal_file = g_strdup_printf ("%s/journal",folder_dir);
gw_folder->journal = camel_groupwise_journal_new (gw_folder, journal_file);
+ g_free (journal_file);
if (!gw_folder->journal) {
camel_object_unref (folder);
return NULL;
Index: camel/providers/groupwise/camel-groupwise-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-store.c,v
retrieving revision 1.75
diff -u -p -r1.75 camel-groupwise-store.c
--- camel/providers/groupwise/camel-groupwise-store.c 18 Sep 2005 18:21:10 -0000 1.75
+++ camel/providers/groupwise/camel-groupwise-store.c 22 Sep 2005 13:43:25 -0000
@@ -146,9 +146,9 @@ groupwise_store_construct (CamelService
store->flags |= CAMEL_STORE_FILTER_INBOX;
/*Hash Table*/
- priv->id_hash = g_hash_table_new (g_str_hash, g_str_equal);
- priv->name_hash = g_hash_table_new (g_str_hash, g_str_equal);
- priv->parent_hash = g_hash_table_new (g_str_hash, g_str_equal);
+ priv->id_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ priv->name_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ priv->parent_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
/*ssl*/
priv->use_ssl = g_strdup (camel_url_get_param (url, "use_ssl"));
@@ -1381,18 +1381,15 @@ camel_groupwise_store_finalize (CamelObj
if(groupwise_store->root_container)
g_free (groupwise_store->root_container);
- if (priv->id_hash) {
- g_hash_table_foreach (priv->id_hash, free_hash, NULL);
+ if (priv->id_hash)
g_hash_table_destroy (priv->id_hash);
- }
- if (priv->name_hash) {
- g_hash_table_foreach (priv->name_hash, free_hash, NULL);
+
+ if (priv->name_hash)
g_hash_table_destroy (priv->name_hash);
- }
- if (priv->parent_hash) {
- g_hash_table_foreach (priv->parent_hash, free_hash, NULL);
+
+ if (priv->parent_hash)
g_hash_table_destroy (priv->parent_hash);
- }
+
g_free (groupwise_store->priv);
groupwise_store->priv = NULL;
}
Index: camel/providers/local/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/local/ChangeLog,v
retrieving revision 1.14
diff -u -p -r1.14 ChangeLog
--- camel/providers/local/ChangeLog 15 Sep 2005 22:23:04 -0000 1.14
+++ camel/providers/local/ChangeLog 22 Sep 2005 13:43:25 -0000
@@ -1,3 +1,8 @@
+2005-09-22 Veerapuram Varadhan <vvaradhan novell com>
+
+ * camel-mbox-summary.c: (message_info_new_from_header):
+ memory-leak fix.
+
2005-09-15 Tor Lillqvist <tml novell com>
* camel-local-summary.c: Use g_ascii_strcasecmp() instead of
Index: camel/providers/local/camel-mbox-summary.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/local/camel-mbox-summary.c,v
retrieving revision 1.55
diff -u -p -r1.55 camel-mbox-summary.c
--- camel/providers/local/camel-mbox-summary.c 31 Aug 2005 04:26:06 -0000 1.55
+++ camel/providers/local/camel-mbox-summary.c 22 Sep 2005 13:43:25 -0000
@@ -319,6 +319,8 @@ message_info_new_from_header(CamelFolder
if (add&1) {
mi->info.info.flags |= CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_MESSAGE_FOLDER_NOXEV;
+ if (mi->info.info.uid)
+ g_free (mi->info.info.uid);
mi->info.info.uid = camel_folder_summary_next_uid_string(s);
} else {
camel_folder_summary_set_uid(s, strtoul(camel_message_info_uid(mi), NULL, 10));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]