From: Tobias Brunner Date: Tue, 27 Oct 2015 16:17:54 +0000 (+0100) Subject: credential-manager: Check cache queue when destroying trusted certificate enumerator X-Git-Tag: 5.4.0rc1~10^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f371effc5d59c15ff72184898193c6119fb8889b;p=thirdparty%2Fstrongswan.git 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). --- diff --git a/src/libstrongswan/credentials/credential_manager.c b/src/libstrongswan/credentials/credential_manager.c index 736111b935..95c5cd7776 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);