summaryrefslogtreecommitdiff
path: root/crypto/openssl/crypto/asn1/bio_asn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/asn1/bio_asn1.c')
-rw-r--r--crypto/openssl/crypto/asn1/bio_asn1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/asn1/bio_asn1.c b/crypto/openssl/crypto/asn1/bio_asn1.c
index dc7efd551c05c..bca4eebf6d3fb 100644
--- a/crypto/openssl/crypto/asn1/bio_asn1.c
+++ b/crypto/openssl/crypto/asn1/bio_asn1.c
@@ -154,7 +154,10 @@ static int asn1_bio_new(BIO *b)
if (!ctx)
return 0;
if (!asn1_bio_init(ctx, DEFAULT_ASN1_BUF_SIZE))
+ {
+ OPENSSL_free(ctx);
return 0;
+ }
b->init = 1;
b->ptr = (char *)ctx;
b->flags = 0;