mirror of
https://github.com/glest/glest-source.git
synced 2025-08-09 18:06:30 +02:00
resource leak: fp
[source/shared_lib/sources/map/map_preview.cpp:830]: (error) Resource leak: f1 Found by https://github.com/bryongloden/cppcheck
This commit is contained in:
committed by
GitHub
parent
60253b4f4b
commit
1cb226283f
@@ -827,6 +827,7 @@ void MapPreview::loadFromFile(const string &path) {
|
|||||||
if(bytes != 1) {
|
if(bytes != 1) {
|
||||||
char szBuf[8096]="";
|
char szBuf[8096]="";
|
||||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",bytes,__LINE__);
|
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",bytes,__LINE__);
|
||||||
|
fclose(f1);
|
||||||
throw megaglest_runtime_error(szBuf);
|
throw megaglest_runtime_error(szBuf);
|
||||||
}
|
}
|
||||||
fromEndianMapFileHeader(header);
|
fromEndianMapFileHeader(header);
|
||||||
|
Reference in New Issue
Block a user