From 97a38b2b1fb33d5b54f97ae497739c822f65f88f Mon Sep 17 00:00:00 2001 From: hujun5 Date: Tue, 23 May 2023 09:56:11 +0800 Subject: [PATCH] ostest/cond_test: cond and mutex need to be destroyed Signed-off-by: hujun5 --- testing/ostest/cond.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/ostest/cond.c b/testing/ostest/cond.c index e6a805ce8..f797471d9 100644 --- a/testing/ostest/cond.c +++ b/testing/ostest/cond.c @@ -348,6 +348,8 @@ void cond_test(void) printf("cond_test: signaler terminated, now cancel the waiter\n"); pthread_detach(waiter); pthread_cancel(waiter); + pthread_cond_destroy(&cond); + pthread_mutex_destroy(&mutex); sem_destroy(&sem_thread_started); printf("cond_test: \tWaiter\tSignaler\n");