diff options
| author | schwarze <> | 2021-07-23 20:40:49 +0000 |
|---|---|---|
| committer | schwarze <> | 2021-07-23 20:40:49 +0000 |
| commit | c08f99f4e73bbd9f63e1186ffff30c0785f91918 (patch) | |
| tree | e392e6ef6cb3dc1f15881af1f556b420055da88d | |
| parent | 9eda938f0a6a5e32d599b98eadf66e97ff482303 (diff) | |
| download | openbsd-c08f99f4e73bbd9f63e1186ffff30c0785f91918.tar.gz openbsd-c08f99f4e73bbd9f63e1186ffff30c0785f91918.tar.bz2 openbsd-c08f99f4e73bbd9f63e1186ffff30c0785f91918.zip | |
Delete some code from X509_PURPOSE_cleanup(3) that had no effect:
it called a function on static objects that returns right away
unless the argument is dynamically allocated.
OK jsing@ tb@
The useless code was independently discovered while writing documentation.
This commit is identical to:
OpenSSL commit fa3a0286d178eb3b87bf2eb5fd7af40f81453314
Author: Kurt Cancemi <kurt at x64architecture dot com>
Date: Wed Jun 8 19:15:38 2016 -0400
| -rw-r--r-- | src/lib/libcrypto/x509/x509_purp.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509/x509_purp.c b/src/lib/libcrypto/x509/x509_purp.c index c81e043f9d..aff9f607bc 100644 --- a/src/lib/libcrypto/x509/x509_purp.c +++ b/src/lib/libcrypto/x509/x509_purp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_purp.c,v 1.4 2021/03/19 18:52:14 tb Exp $ */ | 1 | /* $OpenBSD: x509_purp.c,v 1.5 2021/07/23 20:40:49 schwarze 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 2001. | 3 | * project 2001. |
| 4 | */ | 4 | */ |
| @@ -295,11 +295,7 @@ xptable_free(X509_PURPOSE *p) | |||
| 295 | void | 295 | void |
| 296 | X509_PURPOSE_cleanup(void) | 296 | X509_PURPOSE_cleanup(void) |
| 297 | { | 297 | { |
| 298 | unsigned int i; | ||
| 299 | |||
| 300 | sk_X509_PURPOSE_pop_free(xptable, xptable_free); | 298 | sk_X509_PURPOSE_pop_free(xptable, xptable_free); |
| 301 | for(i = 0; i < X509_PURPOSE_COUNT; i++) | ||
| 302 | xptable_free(xstandard + i); | ||
| 303 | xptable = NULL; | 299 | xptable = NULL; |
| 304 | } | 300 | } |
| 305 | 301 | ||
