Module Name:    src
Committed By:   wiz
Date:           Sun Jan 17 23:09:02 UTC 2010

Modified Files:
        src/lib/libc/gmon: gmon.c

Log Message:
Close log file handle after using it. Found by cppcheck.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/lib/libc/gmon/gmon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gmon/gmon.c
diff -u src/lib/libc/gmon/gmon.c:1.30 src/lib/libc/gmon/gmon.c:1.31
--- src/lib/libc/gmon/gmon.c:1.30	Thu Feb 12 04:57:46 2009
+++ src/lib/libc/gmon/gmon.c	Sun Jan 17 23:09:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gmon.c,v 1.30 2009/02/12 04:57:46 lukem Exp $	*/
+/*	$NetBSD: gmon.c,v 1.31 2010/01/17 23:09:02 wiz Exp $	*/
 
 /*
  * Copyright (c) 2003, 2004 Wasabi Systems, Inc.
@@ -69,7 +69,7 @@
 #if 0
 static char sccsid[] = "@(#)gmon.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: gmon.c,v 1.30 2009/02/12 04:57:46 lukem Exp $");
+__RCSID("$NetBSD: gmon.c,v 1.31 2010/01/17 23:09:02 wiz Exp $");
 #endif
 #endif
 
@@ -481,6 +481,9 @@
 		}
 	}
 	close(fd);
+#ifdef DEBUG
+	close(logfd);
+#endif
 }
 
 /*

Reply via email to