From ffeb5b2e1016a21c24aac891a2427516d67545d7 Mon Sep 17 00:00:00 2001 From: Johnathan Sharratt Date: Fri, 10 May 2024 21:33:00 +1000 Subject: [PATCH] Fix for an exit function this is not running on rewind exits, this could leak memory --- lib/wasix/src/syscalls/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wasix/src/syscalls/mod.rs b/lib/wasix/src/syscalls/mod.rs index 5cca2dd3b0c..676c280c98f 100644 --- a/lib/wasix/src/syscalls/mod.rs +++ b/lib/wasix/src/syscalls/mod.rs @@ -1374,7 +1374,7 @@ pub fn rewind_ext2( if errno != Errno::Success { let exit_code = ExitCode::from(errno); - ctx.data().on_exit(Some(exit_code)); + ctx.data().blocking_on_exit(Some(exit_code)); return Err(exit_code); } }