mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-12 18:38:10 +00:00
fix: use after free in TCPInterface
lol
This commit is contained in:
2
thirdparty/raknet/Source/TCPInterface.cpp
vendored
2
thirdparty/raknet/Source/TCPInterface.cpp
vendored
@@ -211,8 +211,8 @@ SystemAddress TCPInterface::Connect(const char* host, unsigned short remotePort,
|
|||||||
int errorCode = RakNet::RakThread::Create(ConnectionAttemptLoop, s);
|
int errorCode = RakNet::RakThread::Create(ConnectionAttemptLoop, s);
|
||||||
if (errorCode!=0)
|
if (errorCode!=0)
|
||||||
{
|
{
|
||||||
delete s;
|
|
||||||
failedConnectionAttempts.Push(s->systemAddress);
|
failedConnectionAttempts.Push(s->systemAddress);
|
||||||
|
delete s;
|
||||||
}
|
}
|
||||||
return UNASSIGNED_SYSTEM_ADDRESS;
|
return UNASSIGNED_SYSTEM_ADDRESS;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user