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 d0ef660ff6)
This commit is contained in:
Thomas Hindoe Paaboel Andersen 2020-04-10 23:19:28 +02:00 committed by Robert Mader
parent eea81807ee
commit e3b213f9d7

View File

@ -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[] =