mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/DBLayer: Fixed memory leaks when query returned empty result set
This commit is contained in:
@@ -440,6 +440,7 @@ bool PreparedStatementTask::Execute()
|
||||
PreparedResultSet* result = m_conn->Query(m_stmt);
|
||||
if (!result || !result->GetRowCount())
|
||||
{
|
||||
delete result;
|
||||
m_result.set(PreparedQueryResult(NULL));
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user