diff --git a/src/libs/compat/freebsd_network/fbsd_subr_taskqueue.c b/src/libs/compat/freebsd_network/fbsd_subr_taskqueue.c index 2f237a3c64..cddaa00cb2 100644 --- a/src/libs/compat/freebsd_network/fbsd_subr_taskqueue.c +++ b/src/libs/compat/freebsd_network/fbsd_subr_taskqueue.c @@ -182,6 +182,9 @@ taskqueue_free(struct taskqueue *queue) taskqueue_terminate(queue->tq_threads, queue); KASSERT(TAILQ_EMPTY(&queue->tq_active), ("Tasks still running?")); KASSERT(queue->tq_callouts == 0, ("Armed timeout tasks")); +#ifdef __HAIKU__ + TQ_UNLOCK(queue); +#endif mtx_destroy(&queue->tq_mutex); free(queue->tq_threads, M_TASKQUEUE); free(queue->tq_name, M_TASKQUEUE);