[gtk/matthiasc/for-master] inspector: Fix a small memory leak



commit 51ddab3e037f7c150df8bba751b4eb764d252023
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Dec 24 19:40:50 2019 -0500

    inspector: Fix a small memory leak
    
    The property editor was leaking a few GValues.

 gtk/inspector/prop-editor.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c
index b44a2c177b..220d984e78 100644
--- a/gtk/inspector/prop-editor.c
+++ b/gtk/inspector/prop-editor.c
@@ -626,6 +626,7 @@ unichar_changed (GObject *object, GParamSpec *pspec, gpointer data)
   g_value_init (&val, pspec->value_type);
   get_property_value (object, pspec, &val);
   new_val = (gunichar)g_value_get_uint (&val);
+  g_value_unset (&val);
 
   if (new_val != old_val)
     {
@@ -1527,6 +1528,7 @@ readonly_changed (GObject    *object,
 
   gtk_label_set_label (GTK_LABEL (data), value);
 
+  g_value_unset (&gvalue);
   g_free (value);
   g_free (type);
 }


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