[gtk/layout-child-type] Do not leak unapplied layout properties



commit 208cae2f05b0b5f9a43116787b2ec08f5b499b2d
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Mar 28 17:22:02 2019 +0000

    Do not leak unapplied layout properties
    
    If the layout manager does not have a GtkLayoutChild, or if we cannot
    apply layout properties, we should free them instead of leaking them.

 gtk/gtkwidget.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 8b57fdf415..be0a2e8126 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10478,6 +10478,8 @@ gtk_widget_buildable_custom_finished (GtkBuildable *buildable,
                                                        parent,
                                                        layout_data);
 
+      /* Free the unapplied properties, if any */
+      g_slist_free_full (layout_data->properties, layout_property_info_free);
       g_object_unref (layout_data->object);
       g_slice_free (LayoutParserData, layout_data);
     }


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