diff options
Diffstat (limited to 'crypto/x509/by_dir.c')
-rw-r--r-- | crypto/x509/by_dir.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index 5a77b818..3573c86f 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -442,6 +442,12 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, if (!hent) { hent = OPENSSL_malloc(sizeof(BY_DIR_HASH)); + if (hent == NULL) + { + CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); + ok = 0; + goto finish; + } hent->hash = h; hent->suffix = k; if (!sk_BY_DIR_HASH_push(ent->hashes, hent)) |