Fixed possible problem where a file handle could stay open on memory allocation failure

This commit is contained in:
Pavol Marko 2004-10-03 17:04:29 +00:00
parent 87ff81a499
commit 01770f0e5b

View File

@ -616,7 +616,11 @@ int loadModules(const char* filename)
CModule* cc = new CModule( path.c_str() ); CModule* cc = new CModule( path.c_str() );
if ( cc == 0 ) return loaded; if ( cc == 0 )
{
fclose(fp);
return loaded;
}
cc->queryModule(); cc->queryModule();