[gtk/matthiasc/for-master: 3/5] Plug a memory leak in an error case




commit cd60ed43919508b2a02bcc856eb01c0f47d03e60
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Sep 16 15:59:49 2020 -0400

    Plug a memory leak in an error case
    
    gtk_show_uri() not freeing the error after showing
    it to the user.
    
    Pointed out by Peter Bloomfield in #3166

 gtk/gtkshow.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkshow.c b/gtk/gtkshow.c
index 0160a8fe9d..9ecfeb7d84 100644
--- a/gtk/gtkshow.c
+++ b/gtk/gtkshow.c
@@ -182,6 +182,8 @@ show_uri_done (GObject      *object,
                         G_CALLBACK (gtk_window_destroy), NULL);
 
       gtk_window_present (GTK_WINDOW (dialog));
+
+      g_error_free (error);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]