]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Guard fr_openssl_free
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 7 Apr 2021 15:04:10 +0000 (16:04 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 7 Apr 2021 15:11:39 +0000 (16:11 +0100)
src/bin/unit_test_module.c

index d40c0c68eb8fa64c69b3c8c870c55068e661d216..a313dd2ae677d264efee404493864ed696454d8a 100644 (file)
@@ -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