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:
parent
cb8b22410c
commit
59ef8a193e
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user