From a7496bf7e5c276a3d06521fd0951f77cb7af9275 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Sat, 24 Aug 2024 19:05:54 -0700 Subject: [PATCH] threadpool: don't forget to free workers state when omp is enabled --- ggml/src/ggml.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index 356a72217..81c3afa18 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -18877,12 +18877,11 @@ void ggml_release_threadpool(struct ggml_compute_threadpool* threadpool) { UNUSED(rc); } - GGML_ALIGNED_FREE(workers); - ggml_mutex_destroy(&threadpool->mutex); ggml_cond_destroy(&threadpool->cond); #endif // GGML_USE_OPENMP + GGML_ALIGNED_FREE(threadpool->workers); GGML_ALIGNED_FREE(threadpool); }