summaryrefslogtreecommitdiffstats
path: root/lib/libkse
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2006-02-16 01:33:36 +0000
committerdeischen <deischen@FreeBSD.org>2006-02-16 01:33:36 +0000
commit63bc390672b64f30173336480250c8086d1ca56d (patch)
treea9e6965b1e0624f92ee6f9285e37c5e8e7ae17a3 /lib/libkse
parentf1ce5c86603b5f73e31ea323d24ea1433850f704 (diff)
downloadFreeBSD-src-63bc390672b64f30173336480250c8086d1ca56d.zip
FreeBSD-src-63bc390672b64f30173336480250c8086d1ca56d.tar.gz
Don't forget to initialize a tailq before using it.
MFC candidate Noticed by: luoqi
Diffstat (limited to 'lib/libkse')
-rw-r--r--lib/libkse/thread/thr_kern.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c
index ae3a2ff..f1b28c0 100644
--- a/lib/libkse/thread/thr_kern.c
+++ b/lib/libkse/thread/thr_kern.c
@@ -1337,6 +1337,7 @@ kseg_gc(struct pthread *curthread)
if (free_kseg_count <= MAX_CACHED_KSEGS)
return;
+ TAILQ_INIT(&worklist);
crit = _kse_critical_enter();
KSE_LOCK_ACQUIRE(curthread->kse, &kse_lock);
while (free_kseg_count > MAX_CACHED_KSEGS) {
OpenPOWER on IntegriCloud