From 073e0654982dafaff66f17d0b89aa68328aec7f5 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Thu, 2 Aug 2007 11:49:06 +0000 Subject: ** Fix for bug #462007 2007-08-02 Hiroyuki Ikezoe ** Fix for bug #462007 * gui/contact-editor/e-contact-editor.c: (update_preview_cb): Plugged memory leak. svn path=/trunk/; revision=33928 --- addressbook/ChangeLog | 7 +++++++ addressbook/gui/contact-editor/e-contact-editor.c | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 0cc69dd169..2d1ee37c11 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2007-08-02 Hiroyuki Ikezoe + + ** Fix for bug #462007 + + * gui/contact-editor/e-contact-editor.c: (update_preview_cb): Plugged + memory leak. + 2007-07-31 Hiroyuki Ikezoe ** Fix for bug #462002 diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 2c94e0cbd1..62a53ba25c 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -2791,8 +2791,12 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data) pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL); if (!pixbuf) { - filename = e_icon_factory_get_icon_filename ("stock_person",E_ICON_SIZE_DIALOG); - pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL); + gchar *alternate_file; + alternate_file = e_icon_factory_get_icon_filename ("stock_person",E_ICON_SIZE_DIALOG); + if (alternate_file) { + pixbuf = gdk_pixbuf_new_from_file_at_size (alternate_file, 128, 128, NULL); + g_free (alternate_file); + } } g_free (filename); -- cgit