Commit 3d2c8b00 authored by Max Kellermann's avatar Max Kellermann

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.
parent d113c071
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment