diff --git a/quickjs.c b/quickjs.c index 378967211..c56790d86 100644 --- a/quickjs.c +++ b/quickjs.c @@ -34077,7 +34077,8 @@ static void free_function_bytecode(JSRuntime *rt, JSFunctionBytecode *b) { int i; - free_bytecode_atoms(rt, b->byte_code_buf, b->byte_code_len, true); + if (b->byte_code_buf) + free_bytecode_atoms(rt, b->byte_code_buf, b->byte_code_len, true); if (b->vardefs) { for(i = 0; i < b->arg_count + b->var_count; i++) {