diff --git a/src/tm-threads.c b/src/tm-threads.c index b21770e4ea..1d7b5fe149 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -2283,7 +2283,7 @@ int TmThreadsRegisterThread(ThreadVars *tv, const int type) void *newmem = SCRealloc(thread_store.threads, ((thread_store.threads_size + STEP) * sizeof(Thread))); BUG_ON(newmem == NULL); thread_store.threads = newmem; - memset((uint8_t *)thread_store.threads + (thread_store.threads_size * sizeof(Thread)), 0x00, STEP); + memset((uint8_t *)thread_store.threads + (thread_store.threads_size * sizeof(Thread)), 0x00, STEP * sizeof(Thread)); Thread *t = &thread_store.threads[thread_store.threads_size]; t->name = tv->name;