summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/asn1/bio_asn1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/bio_asn1.c b/src/lib/libcrypto/asn1/bio_asn1.c
index 05bc1f7ad3..21f33ecfc9 100644
--- a/src/lib/libcrypto/asn1/bio_asn1.c
+++ b/src/lib/libcrypto/asn1/bio_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_asn1.c,v 1.18 2023/03/04 11:58:29 tb Exp $ */ 1/* $OpenBSD: bio_asn1.c,v 1.19 2023/03/10 11:55:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -177,6 +177,12 @@ asn1_bio_free(BIO *b)
177 ctx = (BIO_ASN1_BUF_CTX *) b->ptr; 177 ctx = (BIO_ASN1_BUF_CTX *) b->ptr;
178 if (ctx == NULL) 178 if (ctx == NULL)
179 return 0; 179 return 0;
180
181 if (ctx->prefix_free != NULL)
182 ctx->prefix_free(b, &ctx->ex_buf, &ctx->ex_len, &ctx->ex_arg);
183 if (ctx->suffix_free != NULL)
184 ctx->suffix_free(b, &ctx->ex_buf, &ctx->ex_len, &ctx->ex_arg);
185
180 free(ctx->buf); 186 free(ctx->buf);
181 free(ctx); 187 free(ctx);
182 b->init = 0; 188 b->init = 0;