Hi All,

>From NetBSD:
Fix fd leak. Found by cppcheck

Index: src/sbin/restore/symtab.c
===================================================================
RCS file: /cvs/src/sbin/restore/symtab.c,v
retrieving revision 1.20
diff -u -p -r1.20 symtab.c
--- src/sbin/restore/symtab.c   24 Apr 2013 13:46:29 -0000      1.20
+++ src/sbin/restore/symtab.c   29 Dec 2013 11:37:28 -0000
@@ -553,6 +553,7 @@ initsymtable(char *filename)
                warn("read");
                panic("cannot read symbol table file %s\n", filename);
        }
+       (void)close(fd);
        switch (command) {
        case 'r':
                /*

Reply via email to