Module Name: src
Committed By: wiz
Date: Tue Jan 4 23:46:34 UTC 2011
Modified Files:
src/sbin/restore: symtab.c
Log Message:
Fix fd leak. Found by cppcheck.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sbin/restore/symtab.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/restore/symtab.c
diff -u src/sbin/restore/symtab.c:1.26 src/sbin/restore/symtab.c:1.27
--- src/sbin/restore/symtab.c:1.26 Wed May 12 21:21:59 2010
+++ src/sbin/restore/symtab.c Tue Jan 4 23:46:34 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: symtab.c,v 1.26 2010/05/12 21:21:59 mbalmer Exp $ */
+/* $NetBSD: symtab.c,v 1.27 2011/01/04 23:46:34 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)symtab.c 8.3 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: symtab.c,v 1.26 2010/05/12 21:21:59 mbalmer Exp $");
+__RCSID("$NetBSD: symtab.c,v 1.27 2011/01/04 23:46:34 wiz Exp $");
#endif
#endif /* not lint */
@@ -572,6 +572,7 @@
fprintf(stderr, "read: %s\n", strerror(errno));
panic("cannot read symbol table file %s\n", filename);
}
+ (void)close(fd);
switch (command) {
case 'r':
/*