ha: Delete cache entry inside the locked mutex

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
This commit is contained in:
Thomas Egerer authored and Tobias Brunner committed 2016-03-23 10:34:24 +01:00
1 parent b31e8c04f2
commit 90a7a68488
1 file changed
+2
+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);
}
/**