Fixed problem with multiple load-unload of comp zlib
authorDavid Brodski <bid@softing.com>
Tue, 13 May 2014 16:06:27 +0000 (18:06 +0200)
committerRich Salz <rsalz@openssl.org>
Wed, 26 Aug 2015 21:34:52 +0000 (17:34 -0400)
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
crypto/comp/c_zlib.c

index 6a57f70..f0fc0af 100644 (file)
@@ -309,7 +309,9 @@ COMP_METHOD *COMP_zlib(void)
 void COMP_zlib_cleanup(void)
 {
 #ifdef ZLIB_SHARED
-    DSO_free(zlib_dso);
+    if (zlib_dso != NULL)
+        DSO_free(zlib_dso);
+    zlib_dso = NULL;
 #endif
 }