diff --git a/src/tests/test-utils.c b/src/tests/test-utils.c index cfade80c5..28cf97164 100644 --- a/src/tests/test-utils.c +++ b/src/tests/test-utils.c @@ -427,7 +427,7 @@ test_client_new (const char *id, MetaWindowClientType type, GError **error) { - TestClient *client = g_new0 (TestClient, 1); + TestClient *client; GSubprocessLauncher *launcher; GSubprocess *subprocess; MetaWaylandCompositor *compositor; @@ -462,6 +462,7 @@ test_client_new (const char *id, if (!subprocess) return NULL; + client = g_new0 (TestClient, 1); client->type = type; client->id = g_strdup (id); client->cancellable = g_cancellable_new ();