1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

Fix audio_thread buffer deallocation race

This commit is contained in:
Nekotekina 2018-10-06 17:35:54 +03:00
parent 73d35b0236
commit 430e2243ac

View File

@ -326,9 +326,6 @@ void audio_thread::operator()()
cellAudio.trace("Audio perf: (access=%d, AddData=%d, events=%d, dump=%d)",
stamp1 - stamp0, stamp2 - stamp1, stamp3 - stamp2, get_system_time() - stamp3);
}
vm::dealloc(m_buffer.addr());
vm::dealloc(m_indexes.addr());
}
error_code cellAudioInit()
@ -376,7 +373,12 @@ error_code cellAudioQuit()
if (*g_audio.get() == thread_state::finished)
{
const auto buf = g_audio->ports[0].addr;
const auto ind = g_audio->ports[0].index;
g_audio.destroy();
g_audio.unlock();
vm::dealloc(buf.addr());
vm::dealloc(ind.addr());
break;
}
}