diff options
Diffstat (limited to 'src/network/core/packet.cpp')
-rw-r--r-- | src/network/core/packet.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/core/packet.cpp b/src/network/core/packet.cpp index 38d00d8c0..511e0c675 100644 --- a/src/network/core/packet.cpp +++ b/src/network/core/packet.cpp @@ -26,8 +26,7 @@ extern void NORETURN CDECL error(const char *str, ...); */ Packet *NetworkSend_Init(const PacketType type) { - Packet *packet; - MallocT(&packet, 1); + Packet *packet = MallocT<Packet>(1); /* An error is inplace here, because it simply means we ran out of memory. */ if (packet == NULL) error("Failed to allocate Packet"); |