From 79a111fc1a2cc2ce6f3a31da552fcd6e9c690c3f Mon Sep 17 00:00:00 2001 From: hujun5 Date: Wed, 2 Aug 2023 20:28:33 +0800 Subject: [PATCH] ostest/mutex: mut need to be destroyed Signed-off-by: hujun5 --- testing/ostest/mutex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/ostest/mutex.c b/testing/ostest/mutex.c index 57ad0b9f3..11781c945 100644 --- a/testing/ostest/mutex.c +++ b/testing/ostest/mutex.c @@ -156,6 +156,8 @@ void mutex_test(void) pthread_join(thread2, NULL); #endif + pthread_mutex_destroy(&mut); + printf("\t\tThread1\tThread2\n"); printf("\tLoops\t%lu\t%lu\n", nloops[0], nloops[1]); printf("\tErrors\t%lu\t%lu\n", nerrors[0], nerrors[1]);