Fixed a resource leak.
This commit is contained in:
parent
f177430acc
commit
6ed7b7b4b3
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user