aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/credentials/credential_manager.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2015-10-27 17:17:54 +0100
committerTobias Brunner <tobias@strongswan.org>2016-03-10 11:07:14 +0100
commitf371effc5d59c15ff72184898193c6119fb8889b (patch)
tree847791edb50ee7d9140b3996097420cfdb32e713 /src/libstrongswan/credentials/credential_manager.c
parent5452e3d66e6bc20f1052f3d616a0f29eab17256c (diff)
downloadstrongswan-f371effc5d59c15ff72184898193c6119fb8889b.tar.bz2
strongswan-f371effc5d59c15ff72184898193c6119fb8889b.tar.xz
credential-manager: Check cache queue when destroying trusted certificate enumerator
We already do this in the trusted public key enumerator (which internally uses the trusted certificate enumerator) but should do so also when this enumerator is used directly (since the public key enumerator has the read lock the additional call will just be skipped there).
Diffstat (limited to 'src/libstrongswan/credentials/credential_manager.c')
-rw-r--r--src/libstrongswan/credentials/credential_manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstrongswan/credentials/credential_manager.c b/src/libstrongswan/credentials/credential_manager.c
index 736111b93..95c5cd777 100644
--- a/src/libstrongswan/credentials/credential_manager.c
+++ b/src/libstrongswan/credentials/credential_manager.c
@@ -918,6 +918,8 @@ METHOD(enumerator_t, trusted_destroy, void,
DESTROY_IF(this->auth);
DESTROY_IF(this->candidates);
this->failed->destroy_offset(this->failed, offsetof(certificate_t, destroy));
+ /* check for delayed certificate cache queue */
+ cache_queue(this->this);
free(this);
}
@@ -986,7 +988,6 @@ METHOD(enumerator_t, public_destroy, void,
this->wrapper->destroy(this->wrapper);
}
this->this->lock->unlock(this->this->lock);
-
/* check for delayed certificate cache queue */
cache_queue(this->this);
free(this);