summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_strnid.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asn1/a_strnid.c')
-rw-r--r--crypto/asn1/a_strnid.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/asn1/a_strnid.c b/crypto/asn1/a_strnid.c
index a7d6b0e3df..948fc1f11a 100644
--- a/crypto/asn1/a_strnid.c
+++ b/crypto/asn1/a_strnid.c
@@ -156,9 +156,10 @@ static ASN1_STRING_TABLE *stable_get(int nid)
tmp = ASN1_STRING_TABLE_get(nid);
if (tmp != NULL && tmp->flags & STABLE_FLAGS_MALLOC)
return tmp;
- rv = OPENSSL_zalloc(sizeof(*rv));
- if (rv == NULL)
+ if ((rv = OPENSSL_zalloc(sizeof(*rv))) == NULL) {
+ ASN1err(ASN1_F_STABLE_GET, ERR_R_MALLOC_FAILURE);
return NULL;
+ }
if (!sk_ASN1_STRING_TABLE_push(stable, rv)) {
OPENSSL_free(rv);
return NULL;