From 208cae2f05b0b5f9a43116787b2ec08f5b499b2d Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 28 Mar 2019 17:22:02 +0000 Subject: [PATCH] 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); }