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:
		@@ -59,6 +59,9 @@ bool LuaScript::Initialize(const std::wstring& scriptFile)
 | 
				
			|||||||
	fseek(file, 0, SEEK_SET);
 | 
						fseek(file, 0, SEEK_SET);
 | 
				
			||||||
	fread(fileData, fileSize, 1, file);
 | 
						fread(fileData, fileSize, 1, file);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						fclose(file);
 | 
				
			||||||
 | 
						file = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int load = luaL_loadbuffer(L, fileData, fileSize, "");
 | 
						int load = luaL_loadbuffer(L, fileData, fileSize, "");
 | 
				
			||||||
	delete [] fileData;
 | 
						delete [] fileData;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user