aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChris Toshok <toshok@src.gnome.org>2000-05-08 11:39:23 +0800
committerChris Toshok <toshok@src.gnome.org>2000-05-08 11:39:23 +0800
commit62a9c29cca1270bde42ab797b23d1eb9fb76ffc5 (patch)
tree18418142ff702a90af56593596e64fbbc6b59e9f /addressbook
parent87eebb44a10e298bde27803b20a2b95d1402a886 (diff)
downloadgsoc2013-evolution-62a9c29cca1270bde42ab797b23d1eb9fb76ffc5.tar.gz
gsoc2013-evolution-62a9c29cca1270bde42ab797b23d1eb9fb76ffc5.tar.zst
gsoc2013-evolution-62a9c29cca1270bde42ab797b23d1eb9fb76ffc5.zip
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
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog10
-rw-r--r--addressbook/gui/component/addressbook.c10
-rw-r--r--addressbook/gui/minicard/e-minicard.c4
-rw-r--r--addressbook/gui/widgets/e-minicard.c4
4 files changed, 24 insertions, 4 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 8f37c1388b..c05d832dde 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,13 @@
+2000-05-07 <toshok@the-dot-in.helixcode.com>
+
+ * 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.
+
2000-05-07 Chris Toshok <toshok@helixcode.com>
* ename/e-name-western.c (e_name_western_extract_middle): comment
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 520ffab568..7794bb50b3 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -54,6 +54,7 @@ typedef struct {
GnomeCanvasItem *rect;
GtkWidget *table;
ETableModel *model;
+ ECardSimple *simple;
GtkAllocation last_alloc;
BonoboControl *control;
BonoboPropertyBag *properties;
@@ -654,6 +655,10 @@ teardown_table_view (AddressbookView *view)
gtk_object_unref (GTK_OBJECT (view->model));
view->model = NULL;
}
+ if (view->simple) {
+ gtk_object_destroy (GTK_OBJECT (view->simple));
+ view->simple = NULL;
+ }
}
static void
@@ -662,7 +667,8 @@ create_table_view (AddressbookView *view, char *initial_query)
ECell *cell_left_just;
ETableHeader *e_table_header;
int i;
- ECardSimple *simple = e_card_simple_new(NULL);
+
+ view->simple = e_card_simple_new(NULL);
view->model = e_addressbook_model_new();
@@ -690,7 +696,7 @@ create_table_view (AddressbookView *view, char *initial_query)
for (i = 0; i < E_CARD_SIMPLE_FIELD_LAST - 1; i++){
/* Create the column. */
ETableCol *ecol = e_table_col_new (
- i, e_card_simple_get_name(simple, i+1),
+ i, e_card_simple_get_name(view->simple, i+1),
80, 20, cell_left_just,
g_str_compare, TRUE);
/* Add it to the header. */
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);
}
}
}
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 6173ee2c9a..0d60824c81 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/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);
}
}
}
bsd-ports-gnome/commit/french?h=gstreamer0.10-removal&id=1bd5277e60bffca80f31fbe24aab7ebc870f7c51'>Update to 8.1.7. Multiple vulnerabilities which could cause thehrs2009-10-151-3/+3 * Update to version 4.3.8.bsam2009-10-131-3/+3 * Update to 9.1.3.hrs2009-10-101-3/+3 * Chase SeaMonkey's upgrade to 1.1.18.thierry2009-09-102-5/+4 * Update to version 4.3.7.1.bsam2009-09-061-3/+3 * The FreeBSD KDE is please to announce the release of KDE 4.3.1,tabthorpe2009-09-022-4/+5 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-223-4/+4 * clean upmakc2009-08-081-3/+0 * The KDE FreeBSD team is proud to announce the release of KDE 4.3.0miwi2009-08-054-27/+113 * . update to version 4.3.6;bsam2009-08-051-3/+3 * -Repocopy devel/libtool15 -> libtool22 and libltdl15 -> libltdl22.mezz2009-08-032-2/+2 * - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-319-3/+9 * Make the port IGNORE for OSVERSION>800079 since it can'tbsam2009-07-221-1/+7 * Update to version 4.3.5.bsam2009-07-201-3/+3 * - update to jpeg7dinoex2009-07-181-2/+2 * Upgrade SeaMonkey's FLP to 1.1.17.thierry2009-06-282-4/+4 * Upgrade to 10.0.3-2.thierry2009-06-224-83/+191 * Chase Code_Aster's upgrade.thierry2009-06-223-7/+7 * Upgrade to 1.16.0.thierry2009-06-224-321/+19 * This port installs the documentation files of Eficas (See the portthierry2009-06-227-0/+348 * Update to 8.1.6 and 9.1.2.hrs2009-06-182-6/+6 * The KDE FreeBSD team is pleased to announce KDE 4.2.4, the last bugfixmiwi2009-06-032-3/+19 * Update to version 4.3.4.bsam2009-06-011-3/+3 * Update to 9.1.1. Two critical vulnerabilities have been fixed:hrs2009-05-131-3/+3 * Update to 8.1.5. Two critical vulnerabilities have been fixed:hrs2009-05-131-3/+3 * Update KDE ports to 4.2.3makc2009-05-102-3/+21 * Update to version 4.3.3.bsam2009-05-041-3/+3 * - USE_APACHE=yes is deprecatedthierry2009-04-222-9/+5 * Update to version 4.3.2.bsam2009-04-031-3/+3 * The KDE FreeBSD team is proud to announce the release of KDE 4.2.2miwi2009-04-023-12/+26 * Add acroread9, Adobe Reader 9.1.0. For changes since Adobe Readerhrs2009-03-293-0/+19 * Update to 8.1.4. This version includes serious security fixes.hrs2009-03-291-3/+3 * Upgrade SeaMonkey's FLP to 1.1.15.thierry2009-03-232-4/+4 * Welcome to the new linux ports infrastructure which allows usingbsam2009-03-202-2/+2 * - Update to 0.1.24miwi2009-03-142-5/+4 * Update KDE to 4.2.1.makc2009-03-092-3/+19 * Update to version 4.3.1.bsam2009-03-081-3/+3 * Fix compilation with gcc-43.thierry2009-02-108-0/+87 * - Add all manpages for kde4-l10n*miwi2009-02-091-0/+39 * The KDE FreeBSD team is proud to announce the release of KDE 4.2.0miwi2009-02-093-125/+201 * Here is the long awaited 4.3.0 release. It includes enhancementsbsam2009-02-091-3/+3 * - Update download locationpav2009-02-011-1/+1 * - Update X.org ports to 7.4+ (few ports are more recent than the katamari).flz2009-01-241-1/+1 * Chase Aster's main tarball. No change.thierry2009-01-214-8/+9 * Upgrade to 9.4.0-2.thierry2009-01-213-19/+10 * The tarball has been silently rerolled. Full diff atthierry2009-01-212-4/+5 * Chase Code_Aster's version.thierry2009-01-151-2/+2 * Upgrade to 9.5.1.thierry2009-01-153-139/+288 * Upgrade Code_Aster to 9.4.0.thierry2009-01-157-143/+972 * - Upgrade to 2.3.5;thierry2009-01-152-9/+21