aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/exchange-operations
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-10-02 19:54:42 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-10-02 19:54:42 +0800
commit09d4af6fff63dd112b8bb42087f14f7018e2f78c (patch)
tree991537a9ea1d8487334f6fb299098daf425f9db8 /plugins/exchange-operations
parent79521efaeecfbaf717e465670fcd2724aea53578 (diff)
downloadgsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar
gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.gz
gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.bz2
gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.lz
gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.xz
gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.zst
gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.zip
** Fixes bug #469657
2007-10-02 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #469657 * addressbook/importers/evolution-ldif-importer.c: * calendar/gui/comp-editor-factory.c: * composer/e-msg-composer.c: * e-util/e-config-listener.c: * mail/em-composer-prefs.c: * mail/em-folder-tree-model.c: * mail/em-format.c: * mail/em-format-html.c: * mail/em-migrate.c: * mail/em-subscribe-editor.c: * mail/mail-component.c: * mail/mail-send-recv.c: * mail/message-list.c: * mail/importers/elm-importer.c: * plugins/exchange-operations/exchange-folder-size-display.c: * plugins/mono/mono-plugin.c: * shell/e-shell-settings-dialog.c: * tools/killev.c: * widgets/table/e-table-extras.c: * widgets/table/e-table-selection-model.c: Use destroy functions in GHashTables to simplify memory management. svn path=/trunk/; revision=34344
Diffstat (limited to 'plugins/exchange-operations')
-rw-r--r--plugins/exchange-operations/ChangeLog7
-rw-r--r--plugins/exchange-operations/exchange-folder-size-display.c18
2 files changed, 15 insertions, 10 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index 5c1bef7517..a9d05014d7 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-02 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #469657
+
+ * exchange-folder-size-display.c:
+ Use destroy functions in GHashTables to simplify memory management.
+
2007-09-27 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #477045
diff --git a/plugins/exchange-operations/exchange-folder-size-display.c b/plugins/exchange-operations/exchange-folder-size-display.c
index e377ce9cd2..c12f1872d9 100644
--- a/plugins/exchange-operations/exchange-folder-size-display.c
+++ b/plugins/exchange-operations/exchange-folder-size-display.c
@@ -41,13 +41,6 @@ enum {
NUM_COLUMNS
};
-static void
-free_entries (gpointer name, gpointer value, gpointer data)
-{
- g_free (name);
- g_free (value);
-}
-
static gboolean
get_folder_size_func (GtkTreeModel *model,
GtkTreePath *path,
@@ -67,17 +60,22 @@ get_folder_size_func (GtkTreeModel *model,
char *
exchange_folder_size_get_val (GtkListStore *model, const char *folder_name)
{
- GHashTable *finfo = g_hash_table_new (g_str_hash, g_str_equal);
+ GHashTable *finfo;
char *folder_size, *fsize;
+ finfo = g_hash_table_new_full (
+ g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) g_free);
+
gtk_tree_model_foreach (GTK_TREE_MODEL (model), get_folder_size_func, finfo);
if ((fsize = g_hash_table_lookup (finfo, folder_name)) != NULL)
folder_size = g_strdup (fsize);
else
folder_size = g_strdup ("0");
-
- g_hash_table_foreach (finfo, free_entries, NULL);
+
+ g_hash_table_destroy (finfo);
return folder_size;
}