Fix small possible memory leak

This commit is contained in:
tmaul 2012-02-28 22:03:44 +00:00
parent fe1e73724e
commit 5a5c509ff9
1 changed files with 4 additions and 0 deletions

View File

@ -704,6 +704,10 @@ static void PatchFile(const char* ips_path, UINT8* base)
memset(buf, 0, sizeof buf);
fread(buf, 1, 5, f);
if (strcmp(buf, IPS_SIGNATURE)) {
if (buf)
{
fclose(buf);
}
return;
} else {
UINT8 ch = 0;