ha: Delete cache entry inside the locked mutex

Signed-off-by: Thomas Egerer <[email protected]>
This commit is contained in:
Thomas Egerer
2016-03-23 10:34:24 +01:00
committed by Tobias Brunner
parent b31e8c04f2
commit 90a7a68488
+2
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);
}
/**