Skip to content

Commit

Permalink
fix: segfault due to use unsafe env
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhuyan committed Apr 11, 2024
1 parent 11938e1 commit 419550b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c_src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 419550b

Please sign in to comment.