From 9bd3edcbcd1e63118a2f2311e9b8306e1f7dcc6b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 10 Aug 2023 17:04:40 +0200 Subject: [PATCH] Fix bug when cleaning up after allocation error. --- jsstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsstate.c b/jsstate.c index 6141111..715b793 100644 --- a/jsstate.c +++ b/jsstate.c @@ -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; }