Fix use after free in NetworkClient and NetworkServer
This commit is contained in:
1 parent
acc7fa6754
commit
3b2466ba10
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -296,14 +296,14 @@ void NetworkClient::StopClient()
|
||||
/*-----------------------------------------------------*\
|
||||
| Close the ProfileManager listen thread |
|
||||
\*-----------------------------------------------------*/
|
||||
if(profilemanager_thread->thread)
|
||||
if(profilemanager_thread)
|
||||
{
|
||||
profilemanager_thread->online = false;
|
||||
profilemanager_thread->start_cv.notify_all();
|
||||
profilemanager_thread->thread->join();
|
||||
delete profilemanager_thread->thread;
|
||||
profilemanager_thread->thread = nullptr;
|
||||
delete profilemanager_thread;
|
||||
profilemanager_thread = nullptr;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
|
||||
Reference in new issue
Block a user