diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-10-02 19:54:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-10-02 19:54:42 +0800 |
commit | 09d4af6fff63dd112b8bb42087f14f7018e2f78c (patch) | |
tree | 991537a9ea1d8487334f6fb299098daf425f9db8 /addressbook/importers/evolution-ldif-importer.c | |
parent | 79521efaeecfbaf717e465670fcd2724aea53578 (diff) | |
download | gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.gz 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 'addressbook/importers/evolution-ldif-importer.c')
-rw-r--r-- | addressbook/importers/evolution-ldif-importer.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c index 5080557c17..1e055db4da 100644 --- a/addressbook/importers/evolution-ldif-importer.c +++ b/addressbook/importers/evolution-ldif-importer.c @@ -576,12 +576,6 @@ ldif_supported(EImport *ei, EImportTarget *target, EImportImporter *im) } static void -free_dn_hash(void *k, void *v, void *d) -{ - g_free(k); -} - -static void ldif_import_done(LDIFImporter *gci) { if (gci->idle_id) @@ -593,7 +587,6 @@ ldif_import_done(LDIFImporter *gci) g_slist_foreach(gci->list_contacts, (GFunc) g_object_unref, NULL); g_slist_free(gci->contacts); g_slist_free(gci->list_contacts); - g_hash_table_foreach(gci->dn_contact_hash, free_dn_hash, NULL); g_hash_table_destroy(gci->dn_contact_hash); e_import_complete(gci->import, gci->target); @@ -639,7 +632,10 @@ ldif_import(EImport *ei, EImportTarget *target, EImportImporter *im) fseek(file, 0, SEEK_END); gci->size = ftell(file); fseek(file, 0, SEEK_SET); - gci->dn_contact_hash = g_hash_table_new(g_str_hash, g_str_equal); + gci->dn_contact_hash = g_hash_table_new_full ( + g_str_hash, g_str_equal, + (GDestroyNotify) g_free, + (GDestroyNotify) NULL); e_book_open(gci->book, FALSE, NULL); |