aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-07-05 22:26:04 +0800
committerChris Lahey <clahey@src.gnome.org>2001-07-05 22:26:04 +0800
commit4495c61899a6ad87fee5cbce4e46811739cd8d3f (patch)
tree66ef3c264f01c09298fb72a7dea9a160fc1e1d83 /addressbook/backend
parent9ca1d78a2ef9f417cc173262c20f34fab1310a4f (diff)
downloadgsoc2013-evolution-4495c61899a6ad87fee5cbce4e46811739cd8d3f.tar
gsoc2013-evolution-4495c61899a6ad87fee5cbce4e46811739cd8d3f.tar.gz
gsoc2013-evolution-4495c61899a6ad87fee5cbce4e46811739cd8d3f.tar.bz2
gsoc2013-evolution-4495c61899a6ad87fee5cbce4e46811739cd8d3f.tar.lz
gsoc2013-evolution-4495c61899a6ad87fee5cbce4e46811739cd8d3f.tar.xz
gsoc2013-evolution-4495c61899a6ad87fee5cbce4e46811739cd8d3f.tar.zst
gsoc2013-evolution-4495c61899a6ad87fee5cbce4e46811739cd8d3f.zip
Fix a memory leak here.
2001-07-05 Christopher James Lahey <clahey@ximian.com> * backend/pas/pas-backend-file.c (compare_category): Fix a memory leak here. svn path=/trunk/; revision=10803
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/pas/pas-backend-file.c12
1 files changed, 9 insertions, 3 deletions
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 {