[Xfce4-commits] [apps/xfce4-terminal] 01/01: Fix memory leak in URL open error dialog

noreply at xfce.org noreply at xfce.org
Mon May 8 01:33:21 CEST 2017


This is an automated email from the git hooks/post-receive script.

f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.

commit db3ea51f4f096647aaf0e086d9d292ab91128172
Author: Igor <f2404 at yandex.ru>
Date:   Sun May 7 19:33:13 2017 -0400

    Fix memory leak in URL open error dialog
---
 terminal/terminal-widget.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/terminal/terminal-widget.c b/terminal/terminal-widget.c
index b962ae1..ae32d28 100644
--- a/terminal/terminal-widget.c
+++ b/terminal/terminal-widget.c
@@ -648,7 +648,7 @@ terminal_widget_open_uri (TerminalWidget *widget,
 {
   GtkWindow *window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (widget)));
   GError    *error = NULL;
-  gchar     *uri;
+  gchar     *uri, *escaped;
   guint      i;
 
   for (i = 0; i < G_N_ELEMENTS (regex_patterns); i++)
@@ -689,9 +689,10 @@ terminal_widget_open_uri (TerminalWidget *widget,
 #endif
         {
           /* escape ampersand symbols, etc. */
-          uri = g_markup_escape_text (uri, -1);
+          escaped = g_markup_escape_text (uri, -1);
           /* tell the user that we were unable to open the responsible application */
-          xfce_dialog_show_error (window, error, _("Failed to open the URL '%s'"), uri);
+          xfce_dialog_show_error (window, error, _("Failed to open the URL '%s'"), escaped);
+          g_free (escaped);
           g_error_free (error);
         }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list