From b40e4ce7cd73e5d5d7c14ced38e3157b07acf421 Mon Sep 17 00:00:00 2001 From: Mitch Freeman <65987027+neckkola@users.noreply.github.com> Date: Mon, 6 Jan 2025 01:45:09 -0400 Subject: [PATCH] [Fix] Repair a memory leak in GuildsList (#4585) There was a leak generated when sending the GuildsList Co-authored-by: Mitch Freeman --- common/patches/rof2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 38106fd2a..68aaa7cfa 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -1845,11 +1845,11 @@ namespace RoF2 } } - auto outapp = new EQApplicationPacket(OP_GuildsList); - outapp->size = packet_size; - outapp->pBuffer = buffer; + safe_delete_array(in->pBuffer); - dest->FastQueuePacket(&outapp); + in->pBuffer = buffer; + in->size = packet_size; + dest->FastQueuePacket(&in); } ENCODE(OP_GuildTributeDonateItem)