]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: don't hold tv_root_lock longer than needed
authorVictor Julien <victor@inliniac.net>
Thu, 14 May 2015 08:38:10 +0000 (10:38 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 14 May 2015 12:27:02 +0000 (14:27 +0200)
Don't hold it longer than needed in shutting down.

src/flow-manager.c

index 56ccce3b24d1c14d6becd93a10f1ff3487096814..8283a43e2ed7d3c8c1c91d1cd706ba7650e13225 100644 (file)
@@ -142,13 +142,12 @@ void FlowDisableFlowManagerThread(void)
         }
         tv = tv->next;
     }
+    SCMutexUnlock(&tv_root_lock);
 
     /* wake up threads, another try */
     for (u = 0; u < flowmgr_number; u++)
         SCCtrlCondSignal(&flow_manager_ctrl_cond);
 
-    SCMutexUnlock(&tv_root_lock);
-
     /* reset count, so we can kill and respawn (unix socket) */
     SC_ATOMIC_SET(flowmgr_cnt, 0);
     return;