mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
Fix heap-use-after-free issue with groups
==2317==ERROR: AddressSanitizer: heap-use-after-free on address 0x6170000633c0 at pc 0x55ed1d8e8d8b bp 0x7ffda4bef580 sp 0x7ffda4bef578
WRITE of size 8 at 0x6170000633c0 thread T0
#0 0x55ed1d8e8d8a in Group::SetLeader(Mob*) ../zone/groups.h:80
#1 0x55ed1d8e8d8a in Group::DisbandGroup(bool) ../zone/groups.cpp:1016
ASan didn't like this
This commit is contained in:
parent
66f89416d5
commit
6d47351d15
@ -1006,8 +1006,6 @@ void Group::DisbandGroup(bool joinraid) {
|
|||||||
database.ClearGroup(GetID());
|
database.ClearGroup(GetID());
|
||||||
}
|
}
|
||||||
|
|
||||||
entity_list.RemoveGroup(GetID());
|
|
||||||
|
|
||||||
if(Leader && (Leader->IsLFP()))
|
if(Leader && (Leader->IsLFP()))
|
||||||
{
|
{
|
||||||
Leader->UpdateLFP();
|
Leader->UpdateLFP();
|
||||||
@ -1015,6 +1013,7 @@ void Group::DisbandGroup(bool joinraid) {
|
|||||||
|
|
||||||
SetLeader(nullptr);
|
SetLeader(nullptr);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
|
entity_list.RemoveGroup(GetID());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Group::GetMemberList(std::list<Mob*>& member_list, bool clear_list)
|
void Group::GetMemberList(std::list<Mob*>& member_list, bool clear_list)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user