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).
This commit is contained in:
Tobias Brunner
2016-03-10 11:07:14 +01:00
parent 5452e3d66e
commit f371effc5d
@@ -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);