diff options
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 5 | ||||
-rw-r--r-- | addressbook/backend/pas/pas-backend-file.c | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 8775350463..5627ed8fbd 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,10 @@ 2001-07-05 Christopher James Lahey <clahey@ximian.com> + * backend/pas/pas-backend-file.c (compare_category): Fix a memory + leak here. + +2001-07-05 Christopher James Lahey <clahey@ximian.com> + * backend/ebook/e-card-compare.c (match_search_info_free): Set info->avoid = NULL. This shouldn't make a difference, but it can't hurt. diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c index e9086aa1ff..4f0b54dc61 100644 --- a/addressbook/backend/pas/pas-backend-file.c +++ b/addressbook/backend/pas/pas-backend-file.c @@ -275,6 +275,8 @@ compare_category (ECardSimple *card, const char *str, EList *categories; EIterator *iterator; ECard *ecard; + gboolean ret_val = FALSE; + gtk_object_get (GTK_OBJECT (card), "card", &ecard, NULL); @@ -285,11 +287,15 @@ compare_category (ECardSimple *card, const char *str, for (iterator = e_list_get_iterator(categories); e_iterator_is_valid (iterator); e_iterator_next (iterator)) { const char *category = e_iterator_get (iterator); - if (compare(category, str)) - return TRUE; + if (compare(category, str)) { + ret_val = TRUE; + break; + } } - return FALSE; + gtk_object_unref (GTK_OBJECT (iterator)); + e_card_free_empty_lists (ecard); + return ret_val; } static struct prop_info { |