diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/bio_asn1.c')
-rw-r--r-- | src/lib/libcrypto/asn1/bio_asn1.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/bio_asn1.c b/src/lib/libcrypto/asn1/bio_asn1.c index fa98dba728..b59645909c 100644 --- a/src/lib/libcrypto/asn1/bio_asn1.c +++ b/src/lib/libcrypto/asn1/bio_asn1.c | |||
@@ -153,8 +153,10 @@ static int asn1_bio_new(BIO *b) | |||
153 | ctx = malloc(sizeof(BIO_ASN1_BUF_CTX)); | 153 | ctx = malloc(sizeof(BIO_ASN1_BUF_CTX)); |
154 | if (!ctx) | 154 | if (!ctx) |
155 | return 0; | 155 | return 0; |
156 | if (!asn1_bio_init(ctx, DEFAULT_ASN1_BUF_SIZE)) | 156 | if (!asn1_bio_init(ctx, DEFAULT_ASN1_BUF_SIZE)) { |
157 | free(ctx); | ||
157 | return 0; | 158 | return 0; |
159 | } | ||
158 | b->init = 1; | 160 | b->init = 1; |
159 | b->ptr = (char *)ctx; | 161 | b->ptr = (char *)ctx; |
160 | b->flags = 0; | 162 | b->flags = 0; |