From 36bce27be9400fbc29eb2c34e680384c95ce73b7 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Fri, 1 Dec 2017 11:18:19 +0000 Subject: [PATCH] Destroy seltd st_mtx and st_wait in seltdfini(). A correct destruction is important for WITNESS(4) and LOCK_PROFILING(9). Submitted by: Sebastian Huber MFC after: 1 week --- sys/kern/sys_generic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 546b183ee87d..c5b410fe8bdd 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1884,6 +1884,8 @@ seltdfini(struct thread *td) if (stp->st_free2) uma_zfree(selfd_zone, stp->st_free2); td->td_sel = NULL; + cv_destroy(&stp->st_wait); + mtx_destroy(&stp->st_mtx); free(stp, M_SELECT); }