Commit Diff


commit - 73bd34fe93ae1b9c184ffa896fcfa4acbb451e88
commit + 546209fa2fb3616033d0353aa613ba82eb2a7275
blob - 7645812abef5ef0432deea4aefa9572a613b38f6
blob + 5a99b751f513389c8276292f63bdc23e508d2689
--- FICS/obsproc.c
+++ FICS/obsproc.c
@@ -1823,6 +1823,7 @@ jsave_history(int p, char save_spot, int p1, int from,
 				pprintf(p, "Please report this to an admin.\n");
 				fprintf(stderr, "FICS: System command failed "
 				    "in jsave_journalentry\n");
+				fclose(Game);
 				return;
 			}
 
blob - c0abbbf5d5704ff7595262aa04726b8635810c7a
blob + 92484a1ad1f437ab6ab1945ea886f41c62810a7e
--- FICS/ratings.c
+++ FICS/ratings.c
@@ -1437,6 +1437,7 @@ UpdateRank(int type, char *addName, statistics *sNew, 
 
 	if ((fptemp = fopen(TmpRankFile, "w")) == NULL) {
 		warn("%s: unable to open rank file for updating", __func__);
+		fclose(fp);
 		return;
 	}