diff options
Diffstat (limited to 'src/regress/lib')
-rw-r--r-- | src/regress/lib/libcrypto/engine/enginetest.c | 17 | ||||
-rw-r--r-- | src/regress/lib/libcrypto/free/freenull.c | 8 |
2 files changed, 14 insertions, 11 deletions
diff --git a/src/regress/lib/libcrypto/engine/enginetest.c b/src/regress/lib/libcrypto/engine/enginetest.c index bb2472a31d..f39857d6d6 100644 --- a/src/regress/lib/libcrypto/engine/enginetest.c +++ b/src/regress/lib/libcrypto/engine/enginetest.c | |||
@@ -129,8 +129,7 @@ int main(int argc, char *argv[]) | |||
129 | printf("Remove failed!\n"); | 129 | printf("Remove failed!\n"); |
130 | goto end; | 130 | goto end; |
131 | } | 131 | } |
132 | if (ptr) | 132 | ENGINE_free(ptr); |
133 | ENGINE_free(ptr); | ||
134 | display_engine_list(); | 133 | display_engine_list(); |
135 | if (!ENGINE_add(new_h3) || !ENGINE_add(new_h2)) { | 134 | if (!ENGINE_add(new_h3) || !ENGINE_add(new_h2)) { |
136 | printf("Add failed!\n"); | 135 | printf("Add failed!\n"); |
@@ -178,8 +177,7 @@ int main(int argc, char *argv[]) | |||
178 | if (!ENGINE_remove(ptr)) | 177 | if (!ENGINE_remove(ptr)) |
179 | printf("Remove failed!i - probably no hardware " | 178 | printf("Remove failed!i - probably no hardware " |
180 | "support present.\n"); | 179 | "support present.\n"); |
181 | if (ptr) | 180 | ENGINE_free(ptr); |
182 | ENGINE_free(ptr); | ||
183 | display_engine_list(); | 181 | display_engine_list(); |
184 | 182 | ||
185 | if (!ENGINE_add(new_h1) || !ENGINE_remove(new_h1)) { | 183 | if (!ENGINE_add(new_h1) || !ENGINE_remove(new_h1)) { |
@@ -231,13 +229,12 @@ int main(int argc, char *argv[]) | |||
231 | end: | 229 | end: |
232 | if (to_return) | 230 | if (to_return) |
233 | ERR_print_errors_fp(stderr); | 231 | ERR_print_errors_fp(stderr); |
234 | if (new_h1) ENGINE_free(new_h1); | 232 | ENGINE_free(new_h1); |
235 | if (new_h2) ENGINE_free(new_h2); | 233 | ENGINE_free(new_h2); |
236 | if (new_h3) ENGINE_free(new_h3); | 234 | ENGINE_free(new_h3); |
237 | if (new_h4) ENGINE_free(new_h4); | 235 | ENGINE_free(new_h4); |
238 | for (loop = 0; loop < 512; loop++) | 236 | for (loop = 0; loop < 512; loop++) |
239 | if (block[loop]) | 237 | ENGINE_free(block[loop]); |
240 | ENGINE_free(block[loop]); | ||
241 | ENGINE_cleanup(); | 238 | ENGINE_cleanup(); |
242 | CRYPTO_cleanup_all_ex_data(); | 239 | CRYPTO_cleanup_all_ex_data(); |
243 | ERR_free_strings(); | 240 | ERR_free_strings(); |
diff --git a/src/regress/lib/libcrypto/free/freenull.c b/src/regress/lib/libcrypto/free/freenull.c index 5fe6c1a3ed..89cbd82539 100644 --- a/src/regress/lib/libcrypto/free/freenull.c +++ b/src/regress/lib/libcrypto/free/freenull.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: freenull.c,v 1.6 2018/02/07 05:07:39 jsing Exp $ */ | 1 | /* $OpenBSD: freenull.c,v 1.7 2018/04/14 07:18:37 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2017 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2017 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -17,6 +17,9 @@ | |||
17 | 17 | ||
18 | #include <openssl/asn1.h> | 18 | #include <openssl/asn1.h> |
19 | #include <openssl/ocsp.h> | 19 | #include <openssl/ocsp.h> |
20 | #ifndef OPENSSL_NO_ENGINE | ||
21 | #include <openssl/engine.h> | ||
22 | #endif | ||
20 | #include <openssl/pkcs12.h> | 23 | #include <openssl/pkcs12.h> |
21 | #include <openssl/ts.h> | 24 | #include <openssl/ts.h> |
22 | #include <openssl/ui.h> | 25 | #include <openssl/ui.h> |
@@ -55,6 +58,9 @@ main(int argc, char **argv) | |||
55 | EC_KEY_free(NULL); | 58 | EC_KEY_free(NULL); |
56 | EC_POINT_clear_free(NULL); | 59 | EC_POINT_clear_free(NULL); |
57 | EC_POINT_free(NULL); | 60 | EC_POINT_free(NULL); |
61 | #ifndef OPENSSL_NO_ENGINE | ||
62 | ENGINE_free(NULL); | ||
63 | #endif | ||
58 | EVP_CIPHER_CTX_free(NULL); | 64 | EVP_CIPHER_CTX_free(NULL); |
59 | EVP_PKEY_CTX_free(NULL); | 65 | EVP_PKEY_CTX_free(NULL); |
60 | EVP_PKEY_free(NULL); | 66 | EVP_PKEY_free(NULL); |