]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
windows: fix sc_log_stream_lock handling
authorVictor Julien <victor@inliniac.net>
Tue, 19 Feb 2019 15:44:32 +0000 (16:44 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 20 Feb 2019 06:15:10 +0000 (07:15 +0100)
src/util-debug.c

index 40c9fc0a0f86623a05245842dd08cc8b80a304fd..e4f303711a3deb450b6b3aa3de5af787902d0552 100644 (file)
@@ -78,7 +78,7 @@ SCEnumCharMap sc_log_op_iface_map[ ] = {
 /**
  * \brief Used for synchronous output on WIN32
  */
-static SCMutex sc_log_stream_lock = NULL;
+static SCMutex sc_log_stream_lock;
 #endif /* OS_WIN32 */
 
 /**
@@ -1486,10 +1486,7 @@ void SCLogDeInitLogModule(void)
     SCLogReleaseFGFilters();
 
 #if defined (OS_WIN32)
-       if (sc_log_stream_lock != NULL) {
-               SCMutexDestroy(&sc_log_stream_lock);
-               sc_log_stream_lock = NULL;
-       }
+    SCMutexDestroy(&sc_log_stream_lock);
 #endif /* OS_WIN32 */
 
     return;