From c2855f30b3527a8224a60f0c7d12159c3cd6b680 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sat, 24 Jan 2004 19:09:18 +0000 Subject: oops. (migrate_contact_folder): fix the unreffing. 2004-01-24 Chris Toshok * gui/component/addressbook-migrate.c (migrate_local_folders): oops. (migrate_contact_folder): fix the unreffing. svn path=/trunk/; revision=24408 --- addressbook/ChangeLog | 6 ++++++ addressbook/gui/component/addressbook-migrate.c | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 54b6a5630d..7d853177cd 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2004-01-24 Chris Toshok + + * gui/component/addressbook-migrate.c (migrate_local_folders): + oops. + (migrate_contact_folder): fix the unreffing. + 2004-01-24 Chris Toshok * gui/component/addressbook-migrate.c (migrate_local_folders): use diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c index 116e06ded0..ab35f1fd22 100644 --- a/addressbook/gui/component/addressbook-migrate.c +++ b/addressbook/gui/component/addressbook-migrate.c @@ -295,7 +295,6 @@ migrate_contact_folder (char *old_path, ESourceGroup *dest_group, char *source_n group = e_source_group_new ("", old_uri); old_source = e_source_new ("", ""); e_source_set_group (old_source, group); - g_object_unref (group); new_source = e_source_new (source_name, source_name); e_source_set_group (new_source, dest_group); @@ -317,8 +316,14 @@ migrate_contact_folder (char *old_path, ESourceGroup *dest_group, char *source_n migrate_contacts (old_book, new_book); finish: - g_object_unref (old_book); - g_object_unref (new_book); + g_object_unref (new_source); + g_object_unref (old_source); + g_object_unref (dest_group); + g_object_unref (group); + if (old_book) + g_object_unref (old_book); + if (new_book) + g_object_unref (new_book); g_free (old_uri); } @@ -428,6 +433,7 @@ migrate_local_folders (AddressbookComponent *component, ESourceGroup *on_this_co if (!strcmp ((char*)l->data, local_contact_folder)) continue; + source_name = get_source_name (on_this_computer, (char*)l->data); migrate_contact_folder (l->data, on_this_computer, source_name); g_free (source_name); } -- cgit v1.2.3