mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Fix again memory leaks in CreatureGroupManager::LoadCreatureFormations()
my log: ==28921== 112 bytes in 7 blocks are definitely lost in loss record 8 of 67 ==28921== at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230) ==28921== by 0x8A6043: CreatureGroupManager::LoadCreatureFormations() (CreatureGroups.cpp:111) ==28921== by 0xC00E91: World::SetInitialWorldSettings() (World.cpp:1553) ==28921== by 0x808D56: Master::Run() (Master.cpp:235) ==28921== by 0x808215: main (Main.cpp:154) --HG-- branch : trunk
This commit is contained in:
@@ -130,6 +130,7 @@ void CreatureGroupManager::LoadCreatureFormations()
|
||||
if(!result)
|
||||
{
|
||||
sLog.outErrorDb("creature_formations table leader guid %u incorrect (not exist)", group_member->leaderGUID);
|
||||
delete group_member;
|
||||
continue;
|
||||
}
|
||||
delete result;
|
||||
@@ -138,6 +139,7 @@ void CreatureGroupManager::LoadCreatureFormations()
|
||||
if(!result)
|
||||
{
|
||||
sLog.outErrorDb("creature_formations table member guid %u incorrect (not exist)", memberGUID);
|
||||
delete group_member;
|
||||
continue;
|
||||
}
|
||||
delete result;
|
||||
|
||||
Reference in New Issue
Block a user