summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/x509/by_dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/x509/by_dir.c')
-rw-r--r--crypto/openssl/crypto/x509/by_dir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/x509/by_dir.c b/crypto/openssl/crypto/x509/by_dir.c
index 9ee8f8d..bbc3189 100644
--- a/crypto/openssl/crypto/x509/by_dir.c
+++ b/crypto/openssl/crypto/x509/by_dir.c
@@ -401,6 +401,10 @@ 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) {
+ X509err(X509_F_GET_CERT_BY_SUBJECT, ERR_R_MALLOC_FAILURE);
+ goto finish;
+ }
hent->hash = h;
hent->suffix = k;
if (!sk_BY_DIR_HASH_push(ent->hashes, hent)) {
OpenPOWER on IntegriCloud