Commit 035a1578 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

PulseAudio: handle unlikely NULL deref in Close() (fix LP#754497)

(not applicable to master branch)
parent b8eda4e4
......@@ -357,14 +357,18 @@ static void Close ( vlc_object_t *p_this )
pa_operation *o;
o = pa_stream_flush(p_sys->stream, success_cb, p_aout);
while( pa_operation_get_state(o) == PA_OPERATION_RUNNING )
pa_threaded_mainloop_wait(p_sys->mainloop);
pa_operation_unref(o);
if (likely(o != NULL)) {
while (pa_operation_get_state(o) == PA_OPERATION_RUNNING)
pa_threaded_mainloop_wait(p_sys->mainloop);
pa_operation_unref(o);
}
o = pa_stream_drain(p_sys->stream, success_cb, p_aout);
while( pa_operation_get_state(o) == PA_OPERATION_RUNNING )
pa_threaded_mainloop_wait(p_sys->mainloop);
pa_operation_unref(o);
if (likely(o != NULL)) {
while (pa_operation_get_state(o) == PA_OPERATION_RUNNING)
pa_threaded_mainloop_wait(p_sys->mainloop);
pa_operation_unref(o);
}
pa_threaded_mainloop_unlock(p_sys->mainloop);
}
......
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