mem-cred: We don't need a write lock when looking for a certificate

This commit is contained in:
Tobias Brunner
2015-08-20 19:19:37 +02:00
parent 522b1920b6
commit 58db4edb2c
@@ -197,7 +197,7 @@ METHOD(mem_cred_t, get_cert_ref, certificate_t*,
{
certificate_t *cached;
this->lock->write_lock(this->lock);
this->lock->read_lock(this->lock);
if (this->untrusted->find_first(this->untrusted,
(linked_list_match_t)certificate_equals,
(void**)&cached, cert) == SUCCESS)