Azerothcore-wotlk: Core/Group: Fix memory leak upon group !

Created on 11 Jul 2019  路  3Comments  路  Source: azerothcore/azerothcore-wotlk

Description: the group called RollId.clear(); which prevented roll deletion in group destructor, causing the rolls to leak.

Proposed fix ends all rolls prematurely during group disband - distributing related items and deleting the rolls.

Fix:

https://github.com/TrinityCore/TrinityCore/commit/f04e90f638425c0e0ef2e40f0cd29ab7eec625d1


https://github.com/azerothcore/azerothcore-wotlk/blob/master/src/server/game/Groups/Group.cpp

            player->GetSession()->SendPacket(&data);
        }
    }
    RollId.clear();
    m_memberSlots.clear();

-    RemoveAllInvites();
+
    if (!isBGGroup() && !isBFGroup())

AC HASH/COMMIT: https://github.com/azerothcore/azerothcore-wotlk/commit/6db0a438d9dff3d1fab5f904657ed281f5dee6c7

OS: Windows server 217

MODULES:
Anticheat

Most helpful comment

This is a TC commit and no proof that AC is affected the same way. Blindly implementing commits of other projects is not the right way in my opinion. Also, the TC commit removes "RollId.clear();", and you are suggesting to remove "RemoveAllInvites();"?!?

All 3 comments

This is a TC commit and no proof that AC is affected the same way. Blindly implementing commits of other projects is not the right way in my opinion. Also, the TC commit removes "RollId.clear();", and you are suggesting to remove "RemoveAllInvites();"?!?

I tested and did not have any problems.

I tested and did not have any problems.

then you should open a PR, not opening an issue with the code

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nefertumm picture Nefertumm  路  4Comments

aradep picture aradep  路  3Comments

lineagedr picture lineagedr  路  3Comments

CyberFoxHax picture CyberFoxHax  路  3Comments

Maurowin picture Maurowin  路  3Comments