diff --git a/codemp/cgame/cg_players.c b/codemp/cgame/cg_players.c index 39e32c5..20691d6 100644 --- a/codemp/cgame/cg_players.c +++ b/codemp/cgame/cg_players.c @@ -347,6 +347,7 @@ qboolean CG_ParseSurfsFile( const char *modelName, const char *skinName, char *s if ( len >= sizeof( text ) - 1 ) { Com_Printf( "File %s too long\n", sfilename ); + trap_FS_FCloseFile( f ); return qfalse; } diff --git a/codemp/ui/ui_players.c b/codemp/ui/ui_players.c index 02ba2fb..2b6cd74 100644 --- a/codemp/ui/ui_players.c +++ b/codemp/ui/ui_players.c @@ -1000,6 +1000,7 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat } if ( len >= ( sizeof( text ) - 1 ) ) { Com_Printf( "File %s too long\n", filename ); + trap_FS_FCloseFile( f ); return qfalse; } trap_FS_Read( text, len, f );