ResReadSim.c remove existing fclose() as conflict with recent change

After futher review of this function it looks like the existing
fclose() is not in the correct place, and recent patches have
added fclose() to this function in better places (covering all
returns) but did not take into account the existing misplaced
fclose().
This commit is contained in:
Darryl L. Miles 2025-02-23 11:41:11 +00:00 committed by Tim Edwards
parent dd84be9172
commit 12c6ccc97b
1 changed files with 4 additions and 1 deletions

View File

@ -191,8 +191,11 @@ ResReadSim(simfile, fetproc, capproc, resproc, attrproc, mergeproc, subproc)
case 'r':
break;
default:
/* we expect fclose(fp) and early return to occur below,
* but code path might still modify result (maybe to zero)
* allowing us to loop again, which will then access 'fp'
*/
result = 1;
fclose(fp);
break;
}
if (fettype == -1)