fix errors with mcode

This commit is contained in:
2026-02-09 18:45:55 -06:00
parent c0b4e70eb2
commit 66a44595c8
4 changed files with 270 additions and 178 deletions

View File

@@ -10505,7 +10505,7 @@ static JSValue js_mcode_run (JSContext *ctx, JSValue this_val, int argc, JSValue
JSValue env = (argc >= 3 && JS_IsObject (argv[2])) ? argv[2] : JS_NULL;
JSValue result = JS_CallMcodeTreeEnv (ctx, mcode, env);
cJSON_Delete (mcode);
/* mcode tree ownership transferred to JS_CallMcodeTreeEnv — do not free */
JS_FreeCString (ctx, name);
return result;
}