aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-11-28 07:09:06 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-11-28 07:09:06 +0100
commit5afe65cfc5a34fd1a09bdd1aae29f3d62f5de77a (patch)
tree14b1ea589df5aedac7559addfc1523d989f84a5b /FICS
parent09138f3a504b2d7c1e7e30834f3f68f3bcf8a2ac (diff)
Added missing fclose()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/makerank.c5
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);