ha: Delete cache entry inside the locked mutex

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
This commit is contained in:
Thomas Egerer 2016-03-21 14:46:11 +01:00 committed by Tobias Brunner
parent b31e8c04f2
commit 90a7a68488
1 changed files with 2 additions and 0 deletions

View File

@ -186,11 +186,13 @@ METHOD(ha_cache_t, delete_, void,
{
entry_t *entry;
this->mutex->lock(this->mutex);
entry = this->cache->remove(this->cache, ike_sa);
if (entry)
{
entry_destroy(entry);
}
this->mutex->unlock(this->mutex);
}
/**