From aac622d5087173033d2bfb60945b12239b19f65f Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sat, 27 May 2006 05:54:30 +0000 Subject: [PATCH] Change cterm_end() to only destruy the list/semaphores if the note thread was running. If the note thread dies for some OTHER reason, this will be a resource leak. --- src/conio/cterm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conio/cterm.c b/src/conio/cterm.c index d10953179a..ab7847e11f 100644 --- a/src/conio/cterm.c +++ b/src/conio/cterm.c @@ -1508,8 +1508,8 @@ void cterm_end(void) listPushNode(¬es, NULL); sem_wait(&playnote_thread_terminated); } + sem_destroy(&playnote_thread_terminated); + sem_destroy(¬e_completed_sem); + listFree(¬es); } - sem_destroy(&playnote_thread_terminated); - sem_destroy(¬e_completed_sem); - listFree(¬es); } -- GitLab