From 536c03eb04a02b733c87956f7f86b26b1741cb8f Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Thu, 21 Jun 2001 06:39:28 +0000 Subject: fix a refcounting memleak. 2001-06-20 Chris Toshok * backend/pas/pas-backend-file.c (pas_backend_file_process_get_supported_fields): fix a refcounting memleak. svn path=/trunk/; revision=10351 --- addressbook/ChangeLog | 6 ++++++ addressbook/backend/pas/pas-backend-file.c | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 6d686dc52c..687d6570db 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2001-06-20 Chris Toshok + + * backend/pas/pas-backend-file.c + (pas_backend_file_process_get_supported_fields): fix a refcounting + memleak. + 2001-06-20 Chris Toshok * backend/ebook/e-book-listener.c diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c index 379c2433c8..b77518f831 100644 --- a/addressbook/backend/pas/pas-backend-file.c +++ b/addressbook/backend/pas/pas-backend-file.c @@ -1190,18 +1190,21 @@ pas_backend_file_process_get_supported_fields (PASBackend *backend, PASRequest *req) { EList *fields = e_list_new ((EListCopyFunc)g_strdup, (EListFreeFunc)g_free, NULL); - ECardSimple *card; + ECardSimple *simple; + ECard *card; int i; /* we support everything, so instantiate an e-card, and loop through all fields, adding their ecard_fields. */ - card = e_card_simple_new (e_card_new ("")); + card = e_card_new (""); + simple = e_card_simple_new (card); for (i = 0; i < E_CARD_SIMPLE_FIELD_LAST; i ++) - e_list_append (fields, e_card_simple_get_ecard_field (card, i)); + e_list_append (fields, e_card_simple_get_ecard_field (simple, i)); gtk_object_unref (GTK_OBJECT (card)); + gtk_object_unref (GTK_OBJECT (simple)); pas_book_respond_get_supported_fields (book, GNOME_Evolution_Addressbook_BookListener_Success, -- cgit v1.2.3