Skip to content

Commit 67be849

Browse files
committed
Context: fix missing context_destroy in error handling
Fix missing `context_destroy` (that was missing in 1948de4, see PR Signed-off-by: Davide Bettio <davide@uninstall.it>
1 parent 1948de4 commit 67be849

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libAtomVM/nifs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,7 @@ static term do_spawn(Context *ctx, Context *new_ctx, size_t arity, size_t n_free
12321232
valid_request = true;
12331233
group_leader = term_get_tuple_element(request_term, 3);
12341234
} else {
1235+
context_destroy(new_ctx);
12351236
RAISE_ERROR(BADARG_ATOM);
12361237
}
12371238

0 commit comments

Comments
 (0)