From 35c1d792f8e5505ff6858fcb8dcf160d38c39442 Mon Sep 17 00:00:00 2001 From: jsing Date: Thu, 12 May 2022 19:55:58 +0000 Subject: [PATCH] Rename asn1_enc_free() to asn1_enc_cleanup(). This function does not actually free an ASN1_ENCODING, which are embedded in a struct. Name suggested by tb@ --- lib/libcrypto/asn1/asn1_locl.h | 4 ++-- lib/libcrypto/asn1/tasn_fre.c | 4 ++-- lib/libcrypto/asn1/tasn_utl.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libcrypto/asn1/asn1_locl.h b/lib/libcrypto/asn1/asn1_locl.h index 3a0e5091e3c..eaf2c1af66b 100644 --- a/lib/libcrypto/asn1/asn1_locl.h +++ b/lib/libcrypto/asn1/asn1_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1_locl.h,v 1.30 2022/05/12 19:33:19 jsing Exp $ */ +/* $OpenBSD: asn1_locl.h,v 1.31 2022/05/12 19:55:58 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -171,7 +171,7 @@ const ASN1_TEMPLATE *asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt, int int asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it); void asn1_enc_init(ASN1_VALUE **pval, const ASN1_ITEM *it); -void asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it); +void asn1_enc_cleanup(ASN1_VALUE **pval, const ASN1_ITEM *it); int asn1_enc_save(ASN1_VALUE **pval, CBS *cbs, const ASN1_ITEM *it); int asn1_enc_restore(int *len, unsigned char **out, ASN1_VALUE **pval, const ASN1_ITEM *it); diff --git a/lib/libcrypto/asn1/tasn_fre.c b/lib/libcrypto/asn1/tasn_fre.c index dbf6bf1e8ef..cc7b838cc5e 100644 --- a/lib/libcrypto/asn1/tasn_fre.c +++ b/lib/libcrypto/asn1/tasn_fre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tasn_fre.c,v 1.19 2022/05/10 05:19:22 jsing Exp $ */ +/* $OpenBSD: tasn_fre.c,v 1.20 2022/05/12 19:55:58 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -144,7 +144,7 @@ asn1_item_free(ASN1_VALUE **pval, const ASN1_ITEM *it) if (i == 2) return; } - asn1_enc_free(pval, it); + asn1_enc_cleanup(pval, it); /* If we free up as normal we will invalidate any * ANY DEFINED BY field and we wont be able to * determine the type of the field it defines. So diff --git a/lib/libcrypto/asn1/tasn_utl.c b/lib/libcrypto/asn1/tasn_utl.c index 1fd061f9f8a..86cd42eec7a 100644 --- a/lib/libcrypto/asn1/tasn_utl.c +++ b/lib/libcrypto/asn1/tasn_utl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tasn_utl.c,v 1.16 2022/05/12 19:33:19 jsing Exp $ */ +/* $OpenBSD: tasn_utl.c,v 1.17 2022/05/12 19:55:58 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -161,7 +161,7 @@ asn1_enc_clear(ASN1_ENCODING *aenc) } void -asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it) +asn1_enc_cleanup(ASN1_VALUE **pval, const ASN1_ITEM *it) { ASN1_ENCODING *aenc; -- 2.20.1