From 68026a09a76a82948c8733c446c19fae6bfef686 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Wed, 7 Apr 2021 16:04:10 +0100 Subject: [PATCH] Guard fr_openssl_free --- src/bin/unit_test_module.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/unit_test_module.c b/src/bin/unit_test_module.c index d40c0c68eb8..a313dd2ae67 100644 --- a/src/bin/unit_test_module.c +++ b/src/bin/unit_test_module.c @@ -643,7 +643,7 @@ int main(int argc, char *argv[]) EXIT_WITH_FAILURE; } -#ifdef HAVE_OPENSSL_CRYPTO_H +#ifdef WITH_TLS /* * Mismatch between build time OpenSSL and linked SSL, better to die * here than segfault later. @@ -692,7 +692,7 @@ int main(int argc, char *argv[]) EXIT_WITH_FAILURE; } -#ifdef HAVE_OPENSSL_CRYPTO_H +#ifdef WITH_TLS if (fr_tls_dict_init() < 0) EXIT_WITH_FAILURE; #endif @@ -987,7 +987,9 @@ cleanup: /* * Free any openssl resources and the TLS dictionary */ +#ifdef WITH_TLS fr_openssl_free(); +#endif /* * Free all the dictionaries, and complain/fail if -- 2.47.3