From e3b213f9d73ee6d680d9b1ba19175ce28049833e Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Fri, 10 Apr 2020 23:19:28 +0200 Subject: [PATCH] clutter: fix memleak in test error path If clutter_init fails then we will not free state. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1195 (cherry picked from commit d0ef660ff6f2fa5fed774bd577285b2a7006c887) --- src/tests/clutter/interactive/test-cogl-multitexture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/clutter/interactive/test-cogl-multitexture.c b/src/tests/clutter/interactive/test-cogl-multitexture.c index b2256702b..5d33e40e3 100644 --- a/src/tests/clutter/interactive/test-cogl-multitexture.c +++ b/src/tests/clutter/interactive/test-cogl-multitexture.c @@ -112,7 +112,7 @@ test_cogl_multitexture_main (int argc, char *argv[]) GError *error = NULL; ClutterActor *stage; ClutterColor stage_color = { 0x61, 0x56, 0x56, 0xff }; - TestMultiLayerMaterialState *state = g_new0 (TestMultiLayerMaterialState, 1); + g_autofree TestMultiLayerMaterialState *state = g_new0 (TestMultiLayerMaterialState, 1); gfloat stage_w, stage_h; gchar **files; gfloat tex_coords[] =