ha: Delete cache entry inside the locked mutex
Signed-off-by: Thomas Egerer <[email protected]>
This commit is contained in:
committed by
Tobias Brunner
parent
b31e8c04f2
commit
90a7a68488
@@ -186,11 +186,13 @@ METHOD(ha_cache_t, delete_, void,
|
|||||||
{
|
{
|
||||||
entry_t *entry;
|
entry_t *entry;
|
||||||
|
|
||||||
|
this->mutex->lock(this->mutex);
|
||||||
entry = this->cache->remove(this->cache, ike_sa);
|
entry = this->cache->remove(this->cache, ike_sa);
|
||||||
if (entry)
|
if (entry)
|
||||||
{
|
{
|
||||||
entry_destroy(entry);
|
entry_destroy(entry);
|
||||||
}
|
}
|
||||||
|
this->mutex->unlock(this->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user