From e756467434f787d392c45aac1327768bcf0b610c Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Sun, 14 Mar 2010 20:20:12 +0100 Subject: Fix crash on jack server shutdown On sink unlinking, existing sink inputs are moved, which in turn calls a get latency callback, which references the jack client. Therefore, make sure the sink is unlinked before the client is closed. Failure to do so might lead to SIGSEGV. --- src/modules/jack/module-jack-sink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/modules/jack/module-jack-sink.c b/src/modules/jack/module-jack-sink.c index 9f3e071f..e4467d32 100644 --- a/src/modules/jack/module-jack-sink.c +++ b/src/modules/jack/module-jack-sink.c @@ -475,12 +475,12 @@ void pa__done(pa_module*m) { if (!(u = m->userdata)) return; - if (u->client) - jack_client_close(u->client); - if (u->sink) pa_sink_unlink(u->sink); + if (u->client) + jack_client_close(u->client); + if (u->thread) { pa_asyncmsgq_send(u->thread_mq.inq, NULL, PA_MESSAGE_SHUTDOWN, NULL, 0, NULL); pa_thread_free(u->thread); -- cgit