From 90a7a68488e25e59b4b3cbccd189ed66b5804894 Mon Sep 17 00:00:00 2001 From: Thomas Egerer Date: Mon, 21 Mar 2016 14:46:11 +0100 Subject: [PATCH] ha: Delete cache entry inside the locked mutex Signed-off-by: Thomas Egerer --- src/libcharon/plugins/ha/ha_cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcharon/plugins/ha/ha_cache.c b/src/libcharon/plugins/ha/ha_cache.c index 0650f7fd96..832dcf4acb 100644 --- a/src/libcharon/plugins/ha/ha_cache.c +++ b/src/libcharon/plugins/ha/ha_cache.c @@ -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); } /** -- 2.47.2