1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-14 19:24:10 +03:00

B: Prevents memory leaks

(cherry picked from commit a9b502c32af15e75fb3199312799973225e42a12)
This commit is contained in:
Ruben S. Montero 2017-10-03 19:00:29 +02:00
parent cb8b22410c
commit 59ef8a193e
2 changed files with 13 additions and 0 deletions

View File

@ -1172,6 +1172,8 @@ int AclManager::select_cb(void *nil, int num, char **values, char **names)
int AclManager::select()
{
multimap<long long, AclRule *>::iterator it;
ostringstream oss;
int rc;
@ -1181,6 +1183,11 @@ int AclManager::select()
lock();
for ( it = acl_rules.begin(); it != acl_rules.end(); it++ )
{
delete it->second;
}
acl_rules.clear();
acl_rules_oids.clear();

View File

@ -32,6 +32,12 @@ ActionManager::ActionManager(): listener(0)
ActionManager::~ActionManager()
{
while (!actions.empty())
{
delete actions.front();
actions.pop();
}
pthread_mutex_destroy(&mutex);
pthread_cond_destroy(&cond);