ssl_release(): Fix build with LibreSSL
authorFabian Keil <fk@fabiankeil.de>
Wed, 23 Sep 2020 08:10:43 +0000 (10:10 +0200)
committerFabian Keil <fk@fabiankeil.de>
Sat, 26 Sep 2020 09:16:03 +0000 (11:16 +0200)
... by only calling SSL_COMP_free_compression_methods()
and COMP_zlib_cleanup() if OPENSSL_NO_COMP is undefined.

Briefly tested with LibreSSL 3.1.1 on OpenBSD 6.7.

openssl.c

index 1bf08d1..7e4e3d8 100644 (file)
--- a/openssl.c
+++ b/openssl.c
@@ -2178,12 +2178,14 @@ extern void ssl_release(void)
 {
    if (ssl_inited == 1)
    {
+#ifndef OPENSSL_NO_COMP
       SSL_COMP_free_compression_methods();
-
+#endif
       CONF_modules_free();
       CONF_modules_unload(1);
-
+#ifndef OPENSSL_NO_COMP
       COMP_zlib_cleanup();
+#endif
 
       ERR_free_strings();
       EVP_cleanup();