diff --git a/src/lib/threadpool.c b/src/lib/threadpool.c index 9498a6985..3321a5615 100644 --- a/src/lib/threadpool.c +++ b/src/lib/threadpool.c @@ -525,8 +525,8 @@ int pool_init(pool_t *pool, rc = uv_async_init(loop, &pi->outq_async, work_done); if (rc != 0) { - free(pi); uv_mutex_destroy(&pi->outq_mutex); + free(pi); return rc; }