From: tb Date: Sun, 16 Apr 2023 19:15:31 +0000 (+0000) Subject: Inline the three uses of string_stack_free() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c4aa78229900d9057d852506726bc175bc06a428;p=openbsd Inline the three uses of string_stack_free() sk_OPENSSL_STRING_pop_free() is much more explicit and isn't that much more complicated. x509_util.c can also use it directly... No binary change --- diff --git a/lib/libcrypto/x509/x509_vpm.c b/lib/libcrypto/x509/x509_vpm.c index 5dff102d546..86176118f7e 100644 --- a/lib/libcrypto/x509/x509_vpm.c +++ b/lib/libcrypto/x509/x509_vpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vpm.c,v 1.34 2023/04/16 18:48:58 tb Exp $ */ +/* $OpenBSD: x509_vpm.c,v 1.35 2023/04/16 19:15:31 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2004. */ @@ -139,7 +139,7 @@ x509_param_set_hosts_internal(X509_VERIFY_PARAM_ID *id, int mode, return 0; if (mode == SET_HOST && id->hosts) { - string_stack_free(id->hosts); + sk_OPENSSL_STRING_pop_free(id->hosts, str_free); id->hosts = NULL; } if (name == NULL || namelen == 0) @@ -186,7 +186,7 @@ x509_verify_param_zero(X509_VERIFY_PARAM *param) } paramid = param->id; if (paramid->hosts) { - string_stack_free(paramid->hosts); + sk_OPENSSL_STRING_pop_free(paramid->hosts, str_free); paramid->hosts = NULL; } free(paramid->peername); @@ -332,7 +332,7 @@ X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *dest, const X509_VERIFY_PARAM *src) /* Copy the host flags if and only if we're copying the host list */ if (test_x509_verify_param_copy_id(hosts, NULL)) { if (dest->id->hosts) { - string_stack_free(dest->id->hosts); + sk_OPENSSL_STRING_pop_free(dest->id->hosts, str_free); dest->id->hosts = NULL; } if (id->hosts) {