pipewire-jack: use jack_client_close() to free client in error path

The client needs to be cleaned up properly, otherwise references
to its storage may remain, which can later result in use-after-frees.
For example, the via the various embedded `spa_hook`s in it.

See #2394
This commit is contained in:
Barnabás Pőcze 2022-06-03 01:26:58 +02:00
parent c6a5698eac
commit f2c53622d2

View file

@ -3436,7 +3436,7 @@ server_failed:
exit_unlock:
pw_thread_loop_unlock(client->context.loop);
exit:
free(client);
jack_client_close((jack_client_t *) client);
return NULL;
disabled:
if (status)