From 22f5324eb6719d958ea52a99e645f91610e656cf Mon Sep 17 00:00:00 2001 From: William Yang Date: Thu, 11 Apr 2024 10:19:23 +0200 Subject: [PATCH] fix: segfault due to use unsafe env --- c_src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_src/main.c b/c_src/main.c index 8cb03b0..cfd40e1 100644 --- a/c_src/main.c +++ b/c_src/main.c @@ -591,7 +591,7 @@ erlfdb_future_cancel(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) future = (ErlFDBFuture*) res; enif_mutex_lock(future->lock); - + future->pid_env = env; future->cancelled = true; fdb_future_cancel(future->future);