summaryrefslogtreecommitdiffstats
path: root/hack
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-04-24 20:08:54 +0000
committerchristos <christos@NetBSD.org>2006-04-24 20:08:54 +0000
commit5adf2c6962358bfc33c84e1b6cbbf88e1703cfe9 (patch)
tree9e9a3dd056560a96250470e91b158d40e5e80134 /hack
parentba5c3b560392ec58e721d60d7415a27fab6729dd (diff)
downloadbsdgames-darwin-5adf2c6962358bfc33c84e1b6cbbf88e1703cfe9.tar.gz
bsdgames-darwin-5adf2c6962358bfc33c84e1b6cbbf88e1703cfe9.tar.zst
bsdgames-darwin-5adf2c6962358bfc33c84e1b6cbbf88e1703cfe9.zip
Coverity CID 3032: Prevent double free: Next to the call of page_more()
there is a comment saying /* does fclose */, but the next line calls fclose(fp);. Go figure.
Diffstat (limited to 'hack')
-rw-r--r--hack/hack.pager.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hack/hack.pager.c b/hack/hack.pager.c
index 67962eea..19063908 100644
--- a/hack/hack.pager.c
+++ b/hack/hack.pager.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.pager.c,v 1.9 2006/04/02 00:08:12 christos Exp $ */
+/* $NetBSD: hack.pager.c,v 1.10 2006/04/24 20:08:54 christos Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.pager.c,v 1.9 2006/04/02 00:08:12 christos Exp $");
+__RCSID("$NetBSD: hack.pager.c,v 1.10 2006/04/24 20:08:54 christos Exp $");
#endif /* not lint */
/* This file contains the command routine dowhatis() and a pager. */
@@ -114,7 +114,6 @@ dowhatis()
pline("More info? ");
if (readchar() == 'y') {
page_more(fp, 1); /* does fclose() */
- (void) fclose(fp);
return (0);
}
}