From b127e4b329b45066da1c7c03a4430a89f2bfeee7 Mon Sep 17 00:00:00 2001 From: Ernst Bablick Date: Thu, 19 Sep 2024 19:40:20 +0200 Subject: [PATCH] BF: CS-610 leak within pthread call during shutdown of scheduler --- source/daemons/qmaster/sge_thread_scheduler.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/daemons/qmaster/sge_thread_scheduler.cc b/source/daemons/qmaster/sge_thread_scheduler.cc index 4ce5e620a..d29b9e40c 100644 --- a/source/daemons/qmaster/sge_thread_scheduler.cc +++ b/source/daemons/qmaster/sge_thread_scheduler.cc @@ -437,6 +437,8 @@ sge_scheduler_terminate(lList **answer_list) { sge_mutex_unlock("master scheduler struct", __func__, __LINE__, &(Master_Scheduler.mutex)); + pthread_join(thread_id, nullptr); + INFO(MSG_THREAD_XTERMINATED_S, threadnames[SCHEDD_THREAD]); answer_list_add(answer_list, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_INFO); } else {