Skip to content

Commit bd86598

Browse files
committed
Fix crash on failure to read bytecode (arguments, local variables, etc.)
1 parent 5299e09 commit bd86598

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

quickjs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34077,7 +34077,8 @@ static void free_function_bytecode(JSRuntime *rt, JSFunctionBytecode *b)
3407734077
{
3407834078
int i;
3407934079

34080-
free_bytecode_atoms(rt, b->byte_code_buf, b->byte_code_len, true);
34080+
if (b->byte_code_buf)
34081+
free_bytecode_atoms(rt, b->byte_code_buf, b->byte_code_len, true);
3408134082

3408234083
if (b->vardefs) {
3408334084
for(i = 0; i < b->arg_count + b->var_count; i++) {

0 commit comments

Comments
 (0)