[Kernel] XThread: Added mutex to set_name.
There is a small chance that game will spam requests for thread name change which will cause invalid free
This commit is contained in:
@@ -136,6 +136,7 @@ void XThread::set_last_error(uint32_t error_code) {
|
||||
}
|
||||
|
||||
void XThread::set_name(const std::string_view name) {
|
||||
std::lock_guard<std::mutex> lock(thread_lock_);
|
||||
thread_name_ = fmt::format("{} ({:08X})", name, handle());
|
||||
|
||||
if (thread_) {
|
||||
|
||||
Reference in New Issue
Block a user