Core/Spells: Fix memory leak when Load() fails from spell/aura-scripts

This commit is contained in:
kaelima
2012-09-04 17:03:04 +02:00
parent c4466facb1
commit a3f9eee4e5
2 changed files with 2 additions and 0 deletions

View File

@@ -2068,6 +2068,7 @@ void Aura::LoadScripts()
{
std::list<AuraScript*>::iterator bitr = itr;
++itr;
delete (*bitr);
m_loadedScripts.erase(bitr);
continue;
}

View File

@@ -6946,6 +6946,7 @@ void Spell::LoadScripts()
{
std::list<SpellScript*>::iterator bitr = itr;
++itr;
delete (*bitr);
m_loadedScripts.erase(bitr);
continue;
}