From f014eb9310af4e5ca41ec2f50785dba864bc7f51 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:34:38 +0800 Subject: [PATCH] [raknet] Match `RakPeer::DeallocatePacket(...)` --- raknet/RakPeer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/raknet/RakPeer.cpp b/raknet/RakPeer.cpp index 5689b67..059feb4 100644 --- a/raknet/RakPeer.cpp +++ b/raknet/RakPeer.cpp @@ -1030,7 +1030,9 @@ void RakPeer::DeallocatePacket( Packet *packet ) return; if (packet->deleteData) - delete packet->data; + if (packet->data) + delete packet->data; + free(packet); }