From 317bcecd09f60134dda35f25942aed85924f9ea8 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 28 Apr 2005 09:27:39 +0000 Subject: Fix some leaks svn path=/trunk/; revision=29237 --- addressbook/ChangeLog | 6 ++++++ addressbook/gui/widgets/e-addressbook-view.c | 10 ++++++++++ addressbook/gui/widgets/eab-contact-display.c | 4 +++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 30cf2fccbe..a8a44278d4 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2005-04-28 Ross Burton + + * gui/widgets/e-addressbook-view.c: + * gui/widgets/eab-contact-display.c: + Fix some memory leaks. + 2005-04-21 Mengjie Yu * gui/widgets/e-minicard-view-widget.c: diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 3d2e9fdef5..d98c328cc6 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -368,6 +368,16 @@ eab_view_dispose (GObject *object) eav->invisible = NULL; } + if (eav->search_context) { + g_object_unref (eav->search_context); + eav->search_context = NULL; + } + + if (eav->search_rule) { + g_object_unref (eav->search_rule); + eav->search_rule = NULL; + } + if (eav->ecml_changed_id != 0) { g_signal_handler_disconnect (get_master_list(), eav->ecml_changed_id); diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 145b755781..95e0893b1b 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -75,6 +75,8 @@ on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, gtk_html_stream_write (handle, photo->data, photo->length); gtk_html_end (html, handle, GTK_HTML_STREAM_OK); + + e_contact_photo_free (photo); } else if (!strncmp (url, "evo-icon:", strlen ("evo-icon:"))) { gchar *data; @@ -435,7 +437,7 @@ eab_contact_display_render_normal (EABContactDisplay *display, EContact *contact } - if (e_contact_get (contact, E_CONTACT_IS_LIST)) + if (e_contact_get_const (contact, E_CONTACT_IS_LIST)) render_contact_list (html_stream, contact); else render_contact (html_stream, contact); -- cgit v1.2.3