From 1b33d022e7a03bc93d16b83ba5f9c687e14ed856 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 16 Jul 2025 08:55:35 -0400 Subject: [PATCH] MT#62181 removal from list with lock held Change-Id: I6c650429066df638d2a3b2a24c55e86a8c9b55fe --- core/AmThread.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/AmThread.cpp b/core/AmThread.cpp index a7a0214b..54dff29d 100644 --- a/core/AmThread.cpp +++ b/core/AmThread.cpp @@ -165,7 +165,9 @@ void AmThreadWatcher::run() if(cur_thread->is_stopped()){ DBG("thread %lu has been destroyed.\n", cur_thread->_pid); cur_thread->join(); + _l.lock(); it = thread_list.erase(it); + _l.unlock(); delete cur_thread; } else {