diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-06-27 03:21:10 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-06-27 14:35:07 +0100 |
commit | d2aea038297e0c64ca66e6844cbb37377365885e (patch) | |
tree | 13e11f5b4a91e0dc5316bb7c6fb7203c313be84b /crypto/asn1/bio_asn1.c | |
parent | 3b3b69ab25fbaba80a843dedec5ae9733fefca43 (diff) |
Memory leak and NULL dereference fixes.
PR#3403
Diffstat (limited to 'crypto/asn1/bio_asn1.c')
-rw-r--r-- | crypto/asn1/bio_asn1.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/asn1/bio_asn1.c b/crypto/asn1/bio_asn1.c index dc7efd551c..bca4eebf6d 100644 --- a/crypto/asn1/bio_asn1.c +++ b/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; |