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

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