Fix potential memory leaks (clang-tidy)

This commit is contained in:
Michael Cook (mackal)
2016-05-06 22:58:45 -04:00
parent 74b3fe9d61
commit 47c9182ba3
7 changed files with 183 additions and 158 deletions
+1
View File
@@ -383,6 +383,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
"ORDER BY RAND() LIMIT 1", zone->GetShortName());
auto results = database.QueryDatabase(query);
if (!results.Success()) {
safe_delete(npc_type);
return;
}