From: deraadt Date: Mon, 30 Dec 2013 22:01:23 +0000 (+0000) Subject: Do not leak symtab fd (if at fd limit might even prevent correct operation) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ecb8696c372b07f9c860d242e5d0aaee9fcb3557;p=openbsd Do not leak symtab fd (if at fd limit might even prevent correct operation) from Loganaden Velvindron --- 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': /*