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.
This commit is contained in:
Max Kellermann 2009-03-26 19:49:55 +01:00
parent d113c07190
commit 3d2c8b001a

View File

@ -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;
}