Fixed a resource leak.

This commit is contained in:
Armin Novak 2015-06-24 09:29:52 +02:00
parent f177430acc
commit 6ed7b7b4b3

View File

@ -86,7 +86,11 @@ int IniFile_Load_File(wIniFile* ini, const char* filename)
ini->buffer = NULL;
if (fileSize < 1)
{
fclose(ini->fp);
ini->fp = NULL;
return -1;
}
ini->buffer = (char*) malloc(fileSize + 2);