]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
move tls_free() to header definition
authorAlan T. DeKok <aland@freeradius.org>
Mon, 13 Aug 2018 12:55:40 +0000 (08:55 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 13 Aug 2018 12:55:40 +0000 (08:55 -0400)
so that there are fewer ifdef's in the code

src/bin/radiusd.c
src/lib/tls/base-h
src/lib/tls/base.c

index 7603d355450701e1d440aaf858dc330f7f56cf22..edf036f704abe1730ef4b94da12e2a54e0d9ab73 100644 (file)
@@ -945,9 +945,7 @@ cleanup:
         */
        unlang_free();
 
-#if defined(HAVE_OPENSSL_CRYPTO_H) && OPENSSL_VERSION_NUMBER < 0x10100000L
        tls_free();             /* Cleanup any memory alloced by OpenSSL and placed into globals */
-#endif
 
        if (config) talloc_memory_report = config->talloc_memory_report;        /* Grab this before we free the config */
 
index 882a9c1685f021a3ea62a79ca8320da92f039528..984fa93baa64b7dbd4548e2469b6d4bfce9c1448 100644 (file)
@@ -522,6 +522,8 @@ int         tls_init(void);
 
 #if OPENSSL_VERSION_NUMBER < 0x10100000L
 void           tls_free(void);
+#else
+#define                tls_free()
 #endif
 
 /*
index ba9eeb96d0e216b6fb39876dc009e43d2c754b48..59dedd41690e656571f5fe2ed6980618ad37f529 100644 (file)
@@ -467,8 +467,6 @@ void tls_free(void)
 
        fr_dict_autofree(tls_dict);
 }
-#else
-#define tls_free()
 #endif