From: Arran Cudbard-Bell Date: Wed, 7 Apr 2021 15:04:10 +0000 (+0100) Subject: Guard fr_openssl_free X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68026a09a76a82948c8733c446c19fae6bfef686;p=thirdparty%2Ffreeradius-server.git Guard fr_openssl_free --- 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