summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/bio_asn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asn1/bio_asn1.c')
-rw-r--r--crypto/asn1/bio_asn1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/asn1/bio_asn1.c b/crypto/asn1/bio_asn1.c
index f84b7624b8..dc99e2d7c2 100644
--- a/crypto/asn1/bio_asn1.c
+++ b/crypto/asn1/bio_asn1.c
@@ -102,8 +102,10 @@ static int asn1_bio_new(BIO *b)
{
BIO_ASN1_BUF_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
- if (ctx == NULL)
+ if (ctx == NULL) {
+ ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE);
return 0;
+ }
if (!asn1_bio_init(ctx, DEFAULT_ASN1_BUF_SIZE)) {
OPENSSL_free(ctx);
return 0;