]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
threading: lock TmThreadKillThreadsFamily
authorVictor Julien <victor@inliniac.net>
Wed, 17 Dec 2014 14:50:29 +0000 (15:50 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 19 Dec 2014 11:18:28 +0000 (12:18 +0100)
src/tm-threads.c

index 64964c308f5108654818dfdce5b3b5fd844984fd..0246ec681b02df08d3cd36d1a48697bb00a91bce 100644 (file)
@@ -1697,6 +1697,7 @@ void TmThreadKillThreadsFamily(int family)
     if ((family < 0) || (family >= TVT_MAX))
         return;
 
+    SCMutexLock(&tv_root_lock);
     tv = tv_root[family];
 
     while (tv) {
@@ -1704,6 +1705,7 @@ void TmThreadKillThreadsFamily(int family)
 
         tv = tv->next;
     }
+    SCMutexUnlock(&tv_root_lock);
 }
 
 void TmThreadKillThreads(void)