[gtk/gtk-demo-leaks: 2/2] gtk-demo: Plug a big memory leak




commit 14900efe38a090b96d0f6a8bc2ad16ecca71e132
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Aug 6 21:14:11 2020 -0400

    gtk-demo: Plug a big memory leak
    
    The colors demo was leaking all its colors. Oops.

 demos/gtk-demo/listview_colors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/demos/gtk-demo/listview_colors.c b/demos/gtk-demo/listview_colors.c
index f809b73c1b..b63f2366e0 100644
--- a/demos/gtk-demo/listview_colors.c
+++ b/demos/gtk-demo/listview_colors.c
@@ -226,7 +226,7 @@ gtk_color_set_property (GObject      *object,
       break;
 
     case PROP_COLOR:
-      self->color = *(GdkRGBA *) g_value_dup_boxed (value);
+      self->color = *(GdkRGBA *) g_value_get_boxed (value);
       rgb_to_hsv (&self->color, &h, &s, &v);
       self->h = round (360 * h);
       self->s = round (100 * s);


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