If TmThreadsUnregisterThread was called with out of range 'id', a lock
would not be cleared after returning from the function.
** CID
1264421: Missing unlock (LOCK)
/src/tm-threads.c: 2186 in TmThreadsUnregisterThread()
void TmThreadsUnregisterThread(const int id)
{
SCMutexLock(&thread_store_lock);
- if (id <= 0 || id > (int)thread_store.threads_size)
+ if (id <= 0 || id > (int)thread_store.threads_size) {
+ SCMutexUnlock(&thread_store_lock);
return;
+ }
/* id is one higher than index */
int idx = id - 1;