Remove asn1_ex_clear from ASN1_EXTERN_FUNCS. This is never defined. Change-Id: I1ecaa00f780d6b2f000dc67514c2f49eb4cf2a45 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/63528 Reviewed-by: Bob Beck <bbe@google.com> Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/crypto/asn1/internal.h b/crypto/asn1/internal.h index 5dca728..414b5a9 100644 --- a/crypto/asn1/internal.h +++ b/crypto/asn1/internal.h
@@ -256,7 +256,6 @@ typedef struct ASN1_EXTERN_FUNCS_st { ASN1_ex_new_func *asn1_ex_new; ASN1_ex_free_func *asn1_ex_free; - ASN1_ex_free_func *asn1_ex_clear; ASN1_ex_d2i *asn1_ex_d2i; ASN1_ex_i2d *asn1_ex_i2d; } ASN1_EXTERN_FUNCS;
diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c index e896ead..cc30bc8 100644 --- a/crypto/asn1/tasn_new.c +++ b/crypto/asn1/tasn_new.c
@@ -183,16 +183,9 @@ } static void asn1_item_clear(ASN1_VALUE **pval, const ASN1_ITEM *it) { - const ASN1_EXTERN_FUNCS *ef; - switch (it->itype) { case ASN1_ITYPE_EXTERN: - ef = it->funcs; - if (ef && ef->asn1_ex_clear) { - ef->asn1_ex_clear(pval, it); - } else { - *pval = NULL; - } + *pval = NULL; break; case ASN1_ITYPE_PRIMITIVE:
diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c index 3063ce7..0bca639 100644 --- a/crypto/x509/x_name.c +++ b/crypto/x509/x_name.c
@@ -122,7 +122,6 @@ static const ASN1_EXTERN_FUNCS x509_name_ff = { x509_name_ex_new, x509_name_ex_free, - 0, // Default clear behaviour is OK x509_name_ex_d2i, x509_name_ex_i2d, };
diff --git a/crypto/x509/x_x509.c b/crypto/x509/x_x509.c index 37a11c6..2d4d555 100644 --- a/crypto/x509/x_x509.c +++ b/crypto/x509/x_x509.c
@@ -342,7 +342,6 @@ static const ASN1_EXTERN_FUNCS x509_extern_funcs = { x509_new_cb, x509_free_cb, - /*asn1_ex_clear=*/NULL, x509_d2i_cb, x509_i2d_cb, };