summaryrefslogtreecommitdiff
path: root/std/thread.zc
diff options
context:
space:
mode:
Diffstat (limited to 'std/thread.zc')
-rw-r--r--std/thread.zc4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/thread.zc b/std/thread.zc
index da21772..0722b60 100644
--- a/std/thread.zc
+++ b/std/thread.zc
@@ -108,10 +108,10 @@ impl Thread {
memcpy(ctx, &func, 16);
- let ret = _z_thread_spawn(ctx_copy, &t);
+ let ret = _z_thread_spawn(ctx, &out_handle);
if ret != 0 {
- free(ctx_copy);
+ free(ctx);
return Result<Thread>::Err("Failed to create thread");
}