summaryrefslogtreecommitdiffstats
path: root/atc
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-03-18 23:38:12 +0000
committerchristos <christos@NetBSD.org>2006-03-18 23:38:12 +0000
commit57312f6468b7c76e6cbd3829a9618677af691a57 (patch)
tree8357740815be8a273da84f395108f7850a1a18b5 /atc
parent3533c2661adbdd6a8e87bd34fb50c67c12744499 (diff)
downloadbsdgames-darwin-57312f6468b7c76e6cbd3829a9618677af691a57.tar.gz
bsdgames-darwin-57312f6468b7c76e6cbd3829a9618677af691a57.tar.zst
bsdgames-darwin-57312f6468b7c76e6cbd3829a9618677af691a57.zip
Coverity CID 1786: Close file.
Diffstat (limited to 'atc')
-rw-r--r--atc/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/atc/main.c b/atc/main.c
index 898a7fa2..61ce82e4 100644
--- a/atc/main.c
+++ b/atc/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.15 2005/08/10 17:53:28 rpaulo Exp $ */
+/* $NetBSD: main.c,v 1.16 2006/03/18 23:38:12 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -51,7 +51,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: main.c,v 1.15 2005/08/10 17:53:28 rpaulo Exp $");
+__RCSID("$NetBSD: main.c,v 1.16 2006/03/18 23:38:12 christos Exp $");
#endif
#endif /* not lint */
@@ -241,6 +241,7 @@ default_game(void)
}
if (fgets(line, sizeof(line), fp) == NULL) {
(void)fprintf(stderr, "%s: no default game available\n", games);
+ fclose(fp);
return (NULL);
}
(void)fclose(fp);