[Core] Fix a memory leak in NetPlayServer.cpp in function OnData().
This commit is contained in:
parent
e37cb1fc76
commit
4542b9fcbb
|
@ -406,7 +406,10 @@ unsigned int NetPlayServer::OnData(sf::Packet& packet, sf::SocketTCP& socket)
|
||||||
// If the data is not from the correct player,
|
// If the data is not from the correct player,
|
||||||
// then disconnect them.
|
// then disconnect them.
|
||||||
if (m_wiimote_map[map] != player.pid)
|
if (m_wiimote_map[map] != player.pid)
|
||||||
|
{
|
||||||
|
delete[] data;
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// relay to clients
|
// relay to clients
|
||||||
sf::Packet spac;
|
sf::Packet spac;
|
||||||
|
|
Loading…
Reference in New Issue