1
0
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:
Michał Janiszewski
2016-08-03 07:39:55 +02:00
parent 3f07e5929d
commit e930a09f0b

View File

@@ -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);