summaryrefslogtreecommitdiff
path: root/lib/regex
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-12-27 22:00:48 -0800
committerOri Bernstein <ori@eigenstate.org>2017-12-27 22:00:48 -0800
commit17b6a133ca281986b0dfb9a1ced306e4fc99eb92 (patch)
tree9dd38b67e45451d400d89a939f18b7698ab4cf54 /lib/regex
parenta434ff7d4dfa4121e1070bbba0754bbbd04630c4 (diff)
downloadmc-17b6a133ca281986b0dfb9a1ced306e4fc99eb92.tar.gz
Free retired threads.
Diffstat (limited to 'lib/regex')
-rw-r--r--lib/regex/interp.myr5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/regex/interp.myr b/lib/regex/interp.myr
index ee12369..bb1eea0 100644
--- a/lib/regex/interp.myr
+++ b/lib/regex/interp.myr
@@ -164,8 +164,13 @@ const cleanup = {re
next = thr.next
thrfree(re, thr)
;;
+ for thr = re.freed; thr != Zthr; thr = next
+ next = thr.next
+ thrfree(re, thr)
+ ;;
re.runq = Zthr
re.expired = Zthr
+ re.freed = Zthr
re.nexttid = 0
re.nthr = 0
}