summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-12-30 22:01:23 +0000
committerderaadt <deraadt@openbsd.org>2013-12-30 22:01:23 +0000
commitecb8696c372b07f9c860d242e5d0aaee9fcb3557 (patch)
tree9b4d6109c334ac7726fd361b08dedba3b8033710
parentWhen a function does not obviously terminate itself, it is good practice (diff)
downloadwireguard-openbsd-ecb8696c372b07f9c860d242e5d0aaee9fcb3557.tar.xz
wireguard-openbsd-ecb8696c372b07f9c860d242e5d0aaee9fcb3557.zip
Do not leak symtab fd (if at fd limit might even prevent correct operation)
from Loganaden Velvindron
-rw-r--r--sbin/restore/symtab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/restore/symtab.c b/sbin/restore/symtab.c
index c1a2dd7f44f..5240d2e828c 100644
--- a/sbin/restore/symtab.c
+++ b/sbin/restore/symtab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: symtab.c,v 1.20 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: symtab.c,v 1.21 2013/12/30 22:01:23 deraadt Exp $ */
/* $NetBSD: symtab.c,v 1.10 1997/03/19 08:42:54 lukem Exp $ */
/*
@@ -553,6 +553,7 @@ initsymtable(char *filename)
warn("read");
panic("cannot read symbol table file %s\n", filename);
}
+ close(fd);
switch (command) {
case 'r':
/*