mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Free compressed map when failed to connect client
This commit is contained in:
@@ -1026,6 +1026,7 @@ void Network::Server_Send_MAP(NetworkConnection* connection)
|
||||
log_error("Failed to allocate %u bytes.", header_len + out_size);
|
||||
connection->SetLastDisconnectReason(STR_MULTIPLAYER_CONNECTION_CLOSED);
|
||||
connection->Socket->Disconnect();
|
||||
free(compressed);
|
||||
return;
|
||||
}
|
||||
memcpy(&header[header_len], compressed, out_size);
|
||||
|
||||
Reference in New Issue
Block a user