From: Victor Julien Date: Wed, 17 Dec 2014 14:50:29 +0000 (+0100) Subject: threading: lock TmThreadKillThreadsFamily X-Git-Tag: suricata-2.1beta3~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cef609bb73c19e53ebd45247ffaa7db91a24b0d7;p=thirdparty%2Fsuricata.git threading: lock TmThreadKillThreadsFamily --- diff --git a/src/tm-threads.c b/src/tm-threads.c index 64964c308f..0246ec681b 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -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)