diff --git a/testing/ostest/pthread_rwlock_cancel.c b/testing/ostest/pthread_rwlock_cancel.c index fc4447071..c90ec6d42 100644 --- a/testing/ostest/pthread_rwlock_cancel.c +++ b/testing/ostest/pthread_rwlock_cancel.c @@ -257,6 +257,9 @@ static void test_timeout(void) } #endif /* CONFIG_CANCELLATION_POINTS */ #endif /* CONFIG_PTHREAD_CLEANUP */ + + pthread_rwlock_destroy(&write_lock); + pthread_rwlock_destroy(&read_lock); } /****************************************************************************