From 3d2c8b001a5d808ceab215ecdfbdead1d9d32cbc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 26 Mar 2009 19:49:55 +0100 Subject: 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. --- src/mixer/pulse_mixer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mixer') diff --git a/src/mixer/pulse_mixer.c b/src/mixer/pulse_mixer.c index 5d458b18..a2a4444a 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; } -- cgit v1.2.3