Skip to content
Snippets Groups Projects
Commit aac622d5 authored by deuce's avatar deuce
Browse files

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.
parent 813e9a94
No related branches found
No related tags found
No related merge requests found
...@@ -1508,8 +1508,8 @@ void cterm_end(void) ...@@ -1508,8 +1508,8 @@ void cterm_end(void)
listPushNode(&notes, NULL); listPushNode(&notes, NULL);
sem_wait(&playnote_thread_terminated); sem_wait(&playnote_thread_terminated);
} }
sem_destroy(&playnote_thread_terminated);
sem_destroy(&note_completed_sem);
listFree(&notes);
} }
sem_destroy(&playnote_thread_terminated);
sem_destroy(&note_completed_sem);
listFree(&notes);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment