From 0d7daf586228c2b5ff4a3dc094df17ab3e058ece Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 7 Dec 2014 13:47:50 +0000 Subject: [PATCH] Fix vvp memory leak for user function calls in a continuous assignment. --- vvp/vthread.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vvp/vthread.cc b/vvp/vthread.cc index a6bfe8b3c..e8cd2baff 100644 --- a/vvp/vthread.cc +++ b/vvp/vthread.cc @@ -5785,7 +5785,6 @@ bool of_EXEC_UFUNC(vthread_t thr, vvp_code_t cp) child->wt_context = child_context; child->rd_context = child_context; - child->parent = thr; child->is_scheduled = 1; vthread_run(child); running_thread = thr; @@ -5793,6 +5792,7 @@ bool of_EXEC_UFUNC(vthread_t thr, vvp_code_t cp) if (child->i_have_ended) return true; + child->parent = thr; thr->children.insert(child); thr->i_am_joining = 1; return false;