diff options
author | tb <> | 2023-04-16 19:15:31 +0000 |
---|---|---|
committer | tb <> | 2023-04-16 19:15:31 +0000 |
commit | 720d235498eaa6bca005c6885971d3e57304e185 (patch) | |
tree | a2cc3d12b865b814344db063147a7df99c15dc3a /src/lib | |
parent | d82ccb0d17eee4969272de651647914637726293 (diff) | |
download | openbsd-720d235498eaa6bca005c6885971d3e57304e185.tar.gz openbsd-720d235498eaa6bca005c6885971d3e57304e185.tar.bz2 openbsd-720d235498eaa6bca005c6885971d3e57304e185.zip |
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
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/x509/x509_vpm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509/x509_vpm.c b/src/lib/libcrypto/x509/x509_vpm.c index 5dff102d54..86176118f7 100644 --- a/src/lib/libcrypto/x509/x509_vpm.c +++ b/src/lib/libcrypto/x509/x509_vpm.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_vpm.c,v 1.34 2023/04/16 18:48:58 tb Exp $ */ | 1 | /* $OpenBSD: x509_vpm.c,v 1.35 2023/04/16 19:15:31 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 2004. | 3 | * project 2004. |
4 | */ | 4 | */ |
@@ -139,7 +139,7 @@ x509_param_set_hosts_internal(X509_VERIFY_PARAM_ID *id, int mode, | |||
139 | return 0; | 139 | return 0; |
140 | 140 | ||
141 | if (mode == SET_HOST && id->hosts) { | 141 | if (mode == SET_HOST && id->hosts) { |
142 | string_stack_free(id->hosts); | 142 | sk_OPENSSL_STRING_pop_free(id->hosts, str_free); |
143 | id->hosts = NULL; | 143 | id->hosts = NULL; |
144 | } | 144 | } |
145 | if (name == NULL || namelen == 0) | 145 | if (name == NULL || namelen == 0) |
@@ -186,7 +186,7 @@ x509_verify_param_zero(X509_VERIFY_PARAM *param) | |||
186 | } | 186 | } |
187 | paramid = param->id; | 187 | paramid = param->id; |
188 | if (paramid->hosts) { | 188 | if (paramid->hosts) { |
189 | string_stack_free(paramid->hosts); | 189 | sk_OPENSSL_STRING_pop_free(paramid->hosts, str_free); |
190 | paramid->hosts = NULL; | 190 | paramid->hosts = NULL; |
191 | } | 191 | } |
192 | free(paramid->peername); | 192 | free(paramid->peername); |
@@ -332,7 +332,7 @@ X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *dest, const X509_VERIFY_PARAM *src) | |||
332 | /* Copy the host flags if and only if we're copying the host list */ | 332 | /* Copy the host flags if and only if we're copying the host list */ |
333 | if (test_x509_verify_param_copy_id(hosts, NULL)) { | 333 | if (test_x509_verify_param_copy_id(hosts, NULL)) { |
334 | if (dest->id->hosts) { | 334 | if (dest->id->hosts) { |
335 | string_stack_free(dest->id->hosts); | 335 | sk_OPENSSL_STRING_pop_free(dest->id->hosts, str_free); |
336 | dest->id->hosts = NULL; | 336 | dest->id->hosts = NULL; |
337 | } | 337 | } |
338 | if (id->hosts) { | 338 | if (id->hosts) { |