1
0
mirror of https://github.com/chibicitiberiu/rainmeter-studio.git synced 2024-02-24 04:33:31 +00:00

Script: Fix handle leak with unclosed script file

This commit is contained in:
Birunthan Mohanathas 2013-03-17 17:56:52 +02:00
parent 226416193e
commit 5d6794ce7b

@ -59,6 +59,9 @@ bool LuaScript::Initialize(const std::wstring& scriptFile)
fseek(file, 0, SEEK_SET);
fread(fileData, fileSize, 1, file);
fclose(file);
file = NULL;
int load = luaL_loadbuffer(L, fileData, fileSize, "");
delete [] fileData;