Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/restore Fix fd leak. Found by cppcheck.
details: https://anonhg.NetBSD.org/src/rev/70709aec2bf8
branches: trunk
changeset: 760436:70709aec2bf8
user: wiz <wiz%NetBSD.org@localhost>
date: Tue Jan 04 23:46:34 2011 +0000
description:
Fix fd leak. Found by cppcheck.
diffstat:
sbin/restore/symtab.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 15adcafedc51 -r 70709aec2bf8 sbin/restore/symtab.c
--- a/sbin/restore/symtab.c Tue Jan 04 23:42:48 2011 +0000
+++ b/sbin/restore/symtab.c Tue Jan 04 23:46:34 2011 +0000
@@ -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':
/*
Home |
Main Index |
Thread Index |
Old Index