From bbac8f8bb4dd2fe43388c08c593edac1de712e74 Mon Sep 17 00:00:00 2001 From: Cropi Date: Mon, 23 Jun 2025 12:38:15 +0200 Subject: [PATCH] Release queue mutexes during teardown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Destroy the queue mutex and condition variable in the zos‑remote cleanup and destroy the queue mutex in the main audisp queue destructor after freeing entries. --- audisp/plugins/zos-remote/zos-remote-queue.c | 2 ++ audisp/queue.c | 1 + 2 files changed, 3 insertions(+) diff --git a/audisp/plugins/zos-remote/zos-remote-queue.c b/audisp/plugins/zos-remote/zos-remote-queue.c index 67397f386..eb2c0da36 100644 --- a/audisp/plugins/zos-remote/zos-remote-queue.c +++ b/audisp/plugins/zos-remote/zos-remote-queue.c @@ -152,5 +152,7 @@ void destroy_queue(void) } free(q); + pthread_mutex_destroy(&queue_lock); + pthread_cond_destroy(&queue_nonempty); } diff --git a/audisp/queue.c b/audisp/queue.c index 88bc9c291..f3167125a 100644 --- a/audisp/queue.c +++ b/audisp/queue.c @@ -346,6 +346,7 @@ void destroy_queue(void) free((void *)q[i]); free(q); + pthread_mutex_destroy(&queue_lock); sem_destroy(&queue_nonempty); #ifdef HAVE_ATOMIC /*