mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/RBAC: Fix mem leak
This commit is contained in:
@@ -27,7 +27,18 @@
|
||||
|
||||
AccountMgr::AccountMgr()
|
||||
{
|
||||
}
|
||||
|
||||
AccountMgr::~AccountMgr()
|
||||
{
|
||||
for (RBACPermissionsContainer::iterator itr = _permissions.begin(); itr != _permissions.end(); ++itr)
|
||||
delete itr->second;
|
||||
|
||||
for (RBACRolesContainer::iterator itr = _roles.begin(); itr != _roles.end(); ++itr)
|
||||
delete itr->second;
|
||||
|
||||
for (RBACGroupsContainer::iterator itr = _groups.begin(); itr != _groups.end(); ++itr)
|
||||
delete itr->second;
|
||||
}
|
||||
|
||||
AccountOpResult AccountMgr::CreateAccount(std::string username, std::string password)
|
||||
|
||||
@@ -45,6 +45,7 @@ class AccountMgr
|
||||
|
||||
private:
|
||||
AccountMgr();
|
||||
~AccountMgr();
|
||||
|
||||
public:
|
||||
AccountOpResult CreateAccount(std::string username, std::string password);
|
||||
|
||||
Reference in New Issue
Block a user