mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Free Client.m_PersistentData
Caused by https://github.com/ddnet/ddnet/pull/3605 Found by ASAN: ==11628==ERROR: LeakSanitizer: detected memory leaks Direct leak of 64 byte(s) in 64 object(s) allocated from: #0 0x4f36b3 in __interceptor_malloc (/home/teeworlds/servers/DDNet-Server-asan+0x4f36b3) #1 0x5536a7 in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2362:31 #2 0x562408 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3594:21 #3 0x7f6ee56d209a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
This commit is contained in:
parent
e2cb24b7d9
commit
5261764fb0
|
@ -2685,6 +2685,11 @@ int CServer::Run()
|
|||
m_UPnP.Shutdown();
|
||||
#endif
|
||||
|
||||
for(auto &Client : m_aClients)
|
||||
{
|
||||
free(Client.m_pPersistentData);
|
||||
}
|
||||
|
||||
return ErrorShutdown();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue