aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-26 19:49:55 +0100
committerMax Kellermann <max@duempel.org>2009-03-26 19:49:55 +0100
commit3d2c8b001a5d808ceab215ecdfbdead1d9d32cbc (patch)
tree9def05060dd8b016fb1c648714162015d02ff291
parentd113c07190c620c9b6c79786eb8c441b839d28fd (diff)
downloadmpd-3d2c8b001a5d808ceab215ecdfbdead1d9d32cbc.tar.gz
mpd-3d2c8b001a5d808ceab215ecdfbdead1d9d32cbc.tar.xz
mpd-3d2c8b001a5d808ceab215ecdfbdead1d9d32cbc.zip
pulse_mixer: unlock the mainloop on failure
It's illegal to return from pulse_mixer_setup() without unlocking the main loop. In the error handling, that unlock() call was missing.
Diffstat (limited to '')
-rw-r--r--src/mixer/pulse_mixer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mixer/pulse_mixer.c b/src/mixer/pulse_mixer.c
index 5d458b18f..a2a4444a9 100644
--- a/src/mixer/pulse_mixer.c
+++ b/src/mixer/pulse_mixer.c
@@ -205,6 +205,7 @@ pulse_mixer_setup(struct pulse_mixer *pm)
pa_threaded_mainloop_lock(pm->mainloop);
if (pa_threaded_mainloop_start(pm->mainloop) < 0) {
+ pa_threaded_mainloop_unlock(pm->mainloop);
g_debug("error start mainloop");
return false;
}
@@ -212,6 +213,7 @@ pulse_mixer_setup(struct pulse_mixer *pm)
pa_threaded_mainloop_wait(pm->mainloop);
if (pa_context_get_state(pm->context) != PA_CONTEXT_READY) {
+ pa_threaded_mainloop_unlock(pm->mainloop);
g_debug("error context not ready");
return false;
}