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:37:16 +0000 (17:37 -0400)
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 8cbb153357896c4b224e0678550944f7851bc3b2)

crypto/comp/c_zlib.c

index 6731af8b0d7b2963f2c0e5a012355b28b6c2b15c..9c32614d3c7027529352616235e4bfccce0ccf20 100644 (file)
@@ -404,8 +404,9 @@ COMP_METHOD *COMP_zlib(void)
 void COMP_zlib_cleanup(void)
 {
 #ifdef ZLIB_SHARED
-    if (zlib_dso)
+    if (zlib_dso != NULL)
         DSO_free(zlib_dso);
+    zlib_dso = NULL;
 #endif
 }