Fix bug when cleaning up after allocation error.

This commit is contained in:
Tor Andersson
2023-08-10 17:04:53 +02:00
parent ddd770933b
commit 9bd3edcbcd
+1 -1
View File
@@ -309,7 +309,7 @@ js_State *js_newstate(js_Alloc alloc, void *actx, int flags)
J->stack = alloc(actx, NULL, JS_STACKSIZE * sizeof *J->stack);
if (!J->stack) {
alloc(actx, NULL, 0);
alloc(actx, J, 0);
return NULL;
}