Skip to content

Commit

Permalink
Fix memory leak in WardenScanMgr.
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkosrb committed May 15, 2024
1 parent e2cf815 commit 926daf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/Anticheat/WardenAnticheat/WardenScanMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ bool BuildRawData(std::string const& hexData, std::vector<uint8>& out)

void WardenScanMgr::LoadFromDB()
{
// 0 1 2 3 4 5 6 7 8 9 10 11
auto result = WorldDatabase.Query("SELECT `id`, `type`, `str`, `data`, `address`, `length`, `result`, `flags`, `penalty`, `build_min`, `build_max`, `comment` FROM `warden_scans`");
// 0 1 2 3 4 5 6 7 8 9 10 11
std::unique_ptr<QueryResult> result(WorldDatabase.Query("SELECT `id`, `type`, `str`, `data`, `address`, `length`, `result`, `flags`, `penalty`, `build_min`, `build_max`, `comment` FROM `warden_scans`"));

// copy any non-database scans into a placeholder
std::vector<std::shared_ptr<Scan const> > new_scans;
Expand Down

0 comments on commit 926daf4

Please sign in to comment.