aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Egerer <thomas.egerer@secunet.com>2016-03-21 14:46:11 +0100
committerTobias Brunner <tobias@strongswan.org>2016-03-23 10:34:24 +0100
commit90a7a68488e25e59b4b3cbccd189ed66b5804894 (patch)
tree2c9fc137ec13be1ac7383cee3ed1483bc8f72879 /src
parentb31e8c04f27d28ad9025ee3194b8954d4aa62a84 (diff)
downloadstrongswan-90a7a68488e25e59b4b3cbccd189ed66b5804894.tar.bz2
strongswan-90a7a68488e25e59b4b3cbccd189ed66b5804894.tar.xz
ha: Delete cache entry inside the locked mutex
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/plugins/ha/ha_cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcharon/plugins/ha/ha_cache.c b/src/libcharon/plugins/ha/ha_cache.c
index 0650f7fd9..832dcf4ac 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);
}
/**