diff options
Diffstat (limited to 'lib/libkse/thread/thr_kern.c')
-rw-r--r-- | lib/libkse/thread/thr_kern.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 { |