mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
clang-tidy said this was a use-after-free
Also, what is this code doing?
This commit is contained in:
parent
153e587cea
commit
94d8db4691
@ -2439,6 +2439,7 @@ void EntityList::UpdateWho(bool iSendFullUpdate)
|
|||||||
memcpy(pack->pBuffer, tmp, pack->size);
|
memcpy(pack->pBuffer, tmp, pack->size);
|
||||||
pack->size = sizeof(ServerClientListKeepAlive_Struct) + (tmpNumUpdates * 4);
|
pack->size = sizeof(ServerClientListKeepAlive_Struct) + (tmpNumUpdates * 4);
|
||||||
safe_delete_array(tmp);
|
safe_delete_array(tmp);
|
||||||
|
sclka = (ServerClientListKeepAlive_Struct*) pack->pBuffer;
|
||||||
}
|
}
|
||||||
sclka->wid[sclka->numupdates] = it->second->GetWID();
|
sclka->wid[sclka->numupdates] = it->second->GetWID();
|
||||||
sclka->numupdates++;
|
sclka->numupdates++;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user