Fixed memory leak.

This commit is contained in:
Armin Novak 2014-11-16 15:51:45 +01:00
parent b7304f16b8
commit 45896e7a61

View File

@ -635,7 +635,10 @@ int IniFile_WriteFile(wIniFile* ini, const char* filename)
filename = ini->filename;
if (IniFile_Open_File(ini, filename) < 0)
{
free(buffer);
return -1;
}
fwrite((void*) buffer, length, 1, ini->fp);