From f01d67d4cb15d900602595e7d330932a906035eb Mon Sep 17 00:00:00 2001 From: Stefan Ring Date: Tue, 1 Feb 2011 21:23:59 +0100 Subject: [PATCH] * src/threads/threadlist.cpp (get_free_thread): Actually return free threads objects, don't leak them. --- src/threads/threadlist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/threads/threadlist.cpp b/src/threads/threadlist.cpp index ce055a083..ab3339662 100644 --- a/src/threads/threadlist.cpp +++ b/src/threads/threadlist.cpp @@ -150,7 +150,7 @@ void ThreadList::get_active_java_threads(List &list) /** - * Return a free thread object. + * Return a free thread object. Caller must hold the thread list lock. * * @return free thread object or NULL if none available */ @@ -161,7 +161,7 @@ threadobject* ThreadList::get_free_thread() // Do we have free threads in the free-list? if (_free_thread_list.empty() == false) { // Yes, get the index and remove it from the free list. - threadobject* t = _free_thread_list.front(); + t = _free_thread_list.front(); _free_thread_list.remove(t); } @@ -170,7 +170,7 @@ threadobject* ThreadList::get_free_thread() /** - * Return a free thread index. + * Return a free thread index. Caller must hold the thread list lock. * * @return free thread index */ -- 2.25.1