From 0f57773f769755b91e5222b6ecc455a5cd6c0e63 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 29 Aug 2022 18:49:01 +0200 Subject: [PATCH] [mujs] Free allocated string. Note, seems that memory allocated by js_pushstring must be freed somehow. It will be addressed later. --- src/ecmascript/mujs/localstorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ecmascript/mujs/localstorage.cpp b/src/ecmascript/mujs/localstorage.cpp index c3c64d474..869fdbc0e 100644 --- a/src/ecmascript/mujs/localstorage.cpp +++ b/src/ecmascript/mujs/localstorage.cpp @@ -120,8 +120,8 @@ mjs_localstorage_getitem(js_State *J) js_pushnull(J); return; } - // TODO possible memleak js_pushstring(J, val); + mem_free(val); } static void