diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-28 07:09:06 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-28 07:09:06 +0100 |
commit | 5afe65cfc5a34fd1a09bdd1aae29f3d62f5de77a (patch) | |
tree | 14b1ea589df5aedac7559addfc1523d989f84a5b /FICS | |
parent | 09138f3a504b2d7c1e7e30834f3f68f3bcf8a2ac (diff) |
Added missing fclose()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/makerank.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/FICS/makerank.c b/FICS/makerank.c index 70fe7ea..5f1f2f5 100644 --- a/FICS/makerank.c +++ b/FICS/makerank.c @@ -39,8 +39,11 @@ GetPlayerInfo(char *fileName, ENTRY *e) if ((fp = fopen(fileName, "r")) == NULL || fgets(line, sizeof line, fp) == NULL || - feof(fp)) + feof(fp)) { + if (fp) + fclose(fp); return 0; + } if (!strcmp(line, "v 1\n")) { fgets(line, sizeof line, fp); |