summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Henningsson <diwic@ubuntu.com>2010-03-14 20:20:12 +0100
committerColin Guthrie <cguthrie@mandriva.org>2010-03-15 08:14:37 +0000
commite756467434f787d392c45aac1327768bcf0b610c (patch)
treedc7d3c2fb4f7d354b1cb7b4c29e92d4e2c07cb41
parent29845be64dc1470060388c2fb32223ff42af8d25 (diff)
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.
-rw-r--r--src/modules/jack/module-jack-sink.c6
1 files changed, 3 insertions, 3 deletions
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);