Merge pull request #185 from lioncash/leak

zzogl: Fix a few missing fcloses
This commit is contained in:
Gregory Hainaut 2014-08-07 09:08:17 +02:00
commit a5f54b5ec1
4 changed files with 6 additions and 2 deletions

View File

@ -323,7 +323,8 @@ __forceinline bool LoadShadersFromDat()
fseek(fres, 0, SEEK_SET); fseek(fres, 0, SEEK_SET);
fread(s_lpShaderResources, s, 1, fres); fread(s_lpShaderResources, s, 1, fres);
s_lpShaderResources[s] = 0; s_lpShaderResources[s] = 0;
fclose(fres);
return true; return true;
} }

View File

@ -222,6 +222,7 @@ bool ZZshCreateOpenShadersFile() {
fseek(fres, 0, SEEK_SET); fseek(fres, 0, SEEK_SET);
fread(s_lpShaderResources, s, 1, fres); fread(s_lpShaderResources, s, 1, fres);
s_lpShaderResources[s] = 0; s_lpShaderResources[s] = 0;
fclose(fres);
# endif // _WIN32 # endif // _WIN32
#else // NOT RELEASE_TO_PUBLIC #else // NOT RELEASE_TO_PUBLIC
# ifndef _WIN32 // NOT WINDOWS # ifndef _WIN32 // NOT WINDOWS

View File

@ -274,7 +274,8 @@ __forceinline bool LoadShadersFromDat()
fprintf(stderr, "Failed to read ps2hw.dat. Corrupted file?\n"); fprintf(stderr, "Failed to read ps2hw.dat. Corrupted file?\n");
s_lpShaderResources[s] = 0; s_lpShaderResources[s] = 0;
fclose(fres);
return true; return true;
} }

View File

@ -224,6 +224,7 @@ bool ZZshCreateOpenShadersFile() {
if (fread(s_lpShaderResources, s, 1, fres) == 0) if (fread(s_lpShaderResources, s, 1, fres) == 0)
ZZLog::Error_Log("Cannot read ps2hw.dat in working directory."); ZZLog::Error_Log("Cannot read ps2hw.dat in working directory.");
s_lpShaderResources[s] = 0; s_lpShaderResources[s] = 0;
fclose(fres);
# endif // _WIN32 # endif // _WIN32
#else // NOT RELEASE_TO_PUBLIC #else // NOT RELEASE_TO_PUBLIC
# ifndef _WIN32 // NOT WINDOWS # ifndef _WIN32 // NOT WINDOWS