Guard against null dereference when no workers are running
This commit is contained in:
parent
6f7247464c
commit
9dd266e85a
|
|
@ -1875,6 +1875,10 @@ void workers_stop(int stop_all)
|
||||||
* It's cool enough to be able to reconfigure at all.
|
* It's cool enough to be able to reconfigure at all.
|
||||||
*/
|
*/
|
||||||
w = worker_threads;
|
w = worker_threads;
|
||||||
|
if (w == NULL) {
|
||||||
|
hlog(LOG_CRIT, "Cannot stop worker threads, none running");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
while ((w) && (w->next))
|
while ((w) && (w->next))
|
||||||
w = w->next;
|
w = w->next;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue