From 62a9c29cca1270bde42ab797b23d1eb9fb76ffc5 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 8 May 2000 03:39:23 +0000 Subject: make sure to free the return value of e_card_simple_get. * gui/minicard/e-minicard.c (remodel): make sure to free the return value of e_card_simple_get. * gui/component/addressbook.c (teardown_table_view): destroy the ECardSimple here, plug memory leak. (create_table_view): use view->simple so we can destroy the ECardSimple later on. svn path=/trunk/; revision=2899 --- addressbook/gui/minicard/e-minicard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'addressbook/gui/minicard/e-minicard.c') diff --git a/addressbook/gui/minicard/e-minicard.c b/addressbook/gui/minicard/e-minicard.c index 6173ee2c9a..0d60824c81 100644 --- a/addressbook/gui/minicard/e-minicard.c +++ b/addressbook/gui/minicard/e-minicard.c @@ -547,9 +547,11 @@ remodel( EMinicard *e_minicard ) e_minicard->fields = NULL; for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST && count < 5; field++) { - if (e_card_simple_get(e_minicard->simple, field)) { + char *value = e_card_simple_get(e_minicard->simple, field); + if (value) { add_field(e_minicard, field); count++; + g_free (value); } } } -- cgit v1.2.3