From bd41b1ce859bdf8f731b96c9bc075c6a7ed9e29c Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Tue, 31 Jul 2007 05:46:15 +0000 Subject: [PATCH] Plugged memory leak. 2007-07-31 Hiroyuki Ikezoe * shell/ev-window.c: (file_open_dialog_response_cb): Plugged memory leak. svn path=/trunk/; revision=2605 --- ChangeLog | 5 +++++ shell/ev-window.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc533416..ef337bf4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-07-31 Hiroyuki Ikezoe + + * shell/ev-window.c: (file_open_dialog_response_cb): Plugged memory + leak. + 2007-07-30 Carlos Garcia Campos * configure.ac: diff --git a/shell/ev-window.c b/shell/ev-window.c index 99758209..d3787180 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1506,6 +1506,8 @@ file_open_dialog_response_cb (GtkWidget *chooser, gint response_id, EvWindow *ev_window) { + gchar *uri; + if (response_id == GTK_RESPONSE_OK) { GSList *uris; @@ -1518,8 +1520,10 @@ file_open_dialog_response_cb (GtkWidget *chooser, g_slist_foreach (uris, (GFunc)g_free, NULL); g_slist_free (uris); } - ev_application_set_chooser_uri (EV_APP, - gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (chooser))); + + uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (chooser)); + ev_application_set_chooser_uri (EV_APP, uri); + g_free (uri); gtk_widget_destroy (chooser); } -- 2.43.5