From 80949841b030d5272ae625bc3cca82d2affd09e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 10 Jul 2019 12:29:26 +0200 Subject: [PATCH 09/28] clutter/actor: Take the marging boxed type if valid We were using a clutter margin boxed type, copying it instead of passing the ownership, causing a memory leak. https://gitlab.gnome.org/GNOME/mutter/merge_requests/682 --- clutter/clutter/clutter-actor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index 7111d824d..f7b7be0ab 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -14695,61 +14695,61 @@ clutter_actor_parse_custom_node (ClutterScriptable *scriptable, "written ClutterScript definitions."); #endif l = parse_behaviours (script, actor, node); g_value_init (value, G_TYPE_POINTER); g_value_set_pointer (value, l); retval = TRUE; } else if (strcmp (name, "actions") == 0 || strcmp (name, "constraints") == 0 || strcmp (name, "effects") == 0) { GSList *l; l = parse_actor_metas (script, actor, node); g_value_init (value, G_TYPE_POINTER); g_value_set_pointer (value, l); retval = TRUE; } else if (strcmp (name, "margin") == 0) { ClutterMargin *margin = parse_margin (actor, node); if (margin) { g_value_init (value, CLUTTER_TYPE_MARGIN); - g_value_set_boxed (value, margin); + g_value_take_boxed (value, margin); retval = TRUE; } } return retval; } static void clutter_actor_set_custom_property (ClutterScriptable *scriptable, ClutterScript *script, const gchar *name, const GValue *value) { ClutterActor *actor = CLUTTER_ACTOR (scriptable); #ifdef CLUTTER_ENABLE_DEBUG if (G_UNLIKELY (CLUTTER_HAS_DEBUG (SCRIPT))) { gchar *tmp = g_strdup_value_contents (value); CLUTTER_NOTE (SCRIPT, "in ClutterActor::set_custom_property('%s') = %s", name, tmp); g_free (tmp); } #endif /* CLUTTER_ENABLE_DEBUG */ if (strcmp (name, "rotation") == 0) -- 2.26.2