From: Alan T. DeKok Date: Mon, 13 Aug 2018 12:55:40 +0000 (-0400) Subject: move tls_free() to header definition X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7215d62edddedee4eb2c508c22e5a10b910371d;p=thirdparty%2Ffreeradius-server.git move tls_free() to header definition so that there are fewer ifdef's in the code --- diff --git a/src/bin/radiusd.c b/src/bin/radiusd.c index 7603d355450..edf036f704a 100644 --- a/src/bin/radiusd.c +++ b/src/bin/radiusd.c @@ -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 */ diff --git a/src/lib/tls/base-h b/src/lib/tls/base-h index 882a9c1685f..984fa93baa6 100644 --- a/src/lib/tls/base-h +++ b/src/lib/tls/base-h @@ -522,6 +522,8 @@ int tls_init(void); #if OPENSSL_VERSION_NUMBER < 0x10100000L void tls_free(void); +#else +#define tls_free() #endif /* diff --git a/src/lib/tls/base.c b/src/lib/tls/base.c index ba9eeb96d0e..59dedd41690 100644 --- a/src/lib/tls/base.c +++ b/src/lib/tls/base.c @@ -467,8 +467,6 @@ void tls_free(void) fr_dict_autofree(tls_dict); } -#else -#define tls_free() #endif