From 0414766399840f87486055798dc24ef28705b182 Mon Sep 17 00:00:00 2001 From: davidxu Date: Tue, 23 Sep 2003 04:02:23 +0000 Subject: Free thread name memory if there is. --- lib/libkse/thread/thr_kern.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/libkse') diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index bf94a11..b8a48de 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/thread/thr_kern.c @@ -2352,6 +2352,10 @@ _thr_free(struct pthread *curthread, struct pthread *thread) kse_critical_t crit; DBG_MSG("Freeing thread %p\n", thread); + if (thread->name) { + free(thread->name); + thread->name = NULL; + } if ((curthread == NULL) || (free_thread_count >= MAX_CACHED_THREADS)) { thr_destroy(thread); } else { -- cgit v1.1