Skip to content
Snippets Groups Projects
Commit b5c84c34 authored by Zeno-'s avatar Zeno- Committed by GitHub
Browse files

Fix memory leak in ::safeLoadFile (#4730)

parent 6bb43472
No related branches found
No related tags found
No related merge requests found
......@@ -323,9 +323,12 @@ bool ScriptApiSecurity::safeLoadFile(lua_State *L, const char *path)
}
if (luaL_loadbuffer(L, code, size, chunk_name)) {
delete [] code;
return false;
}
delete [] code;
if (path) {
delete [] chunk_name;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment