1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Initialize result pointer

This fixes a crash in case getaddrinfo returns an error.
This commit is contained in:
Bernd Buschinski
2017-08-20 22:38:36 +02:00
committed by Michał Janiszewski
parent b89e01de8b
commit 0bb0c3b60f

View File

@@ -449,7 +449,7 @@ private:
hints.ai_flags = AI_PASSIVE;
}
addrinfo * result;
addrinfo * result = nullptr;
getaddrinfo(address, serviceName.c_str(), &hints, &result);
if (result == nullptr)
{