From 94d8db4691dff22970d80da19d8dad2f248e33dd Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 16 Mar 2017 14:10:36 -0400 Subject: [PATCH] clang-tidy said this was a use-after-free Also, what is this code doing? --- zone/entity.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/entity.cpp b/zone/entity.cpp index 2bc1b99ed..4a6c2c20a 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -2439,6 +2439,7 @@ void EntityList::UpdateWho(bool iSendFullUpdate) memcpy(pack->pBuffer, tmp, pack->size); pack->size = sizeof(ServerClientListKeepAlive_Struct) + (tmpNumUpdates * 4); safe_delete_array(tmp); + sclka = (ServerClientListKeepAlive_Struct*) pack->pBuffer; } sclka->wid[sclka->numupdates] = it->second->GetWID(); sclka->numupdates++;