Subject: lib/24856: libutil's ttyaction(3) fails to close file on error state
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jeffi@rcn.com>
List: netbsd-bugs
Date: 03/20/2004 03:46:32
>Number: 24856
>Category: lib
>Synopsis: libutil's ttyaction(3) fails to close file on error state
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 20 03:47:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Jeff Ito
>Release: 1.6ZK
>Organization:
>Environment:
NetBSD lab 1.6ZK NetBSD 1.6ZK (LAB) #4: Tue Mar 9 22:03:23 EST 2004 jeff@netbsd:/q/nbsd/src/sys/arch/i386/compile/LAB i386
>Description:
libutil's ttyaction(3) fails to close file prior to exiting on error.
>How-To-Repeat:
n/a
>Fix:
Index: ttyaction.c
===================================================================
RCS file: /cvs/nbsd/src/lib/libutil/ttyaction.c,v
retrieving revision 1.15
diff -u -r1.15 ttyaction.c
--- ttyaction.c 19 Dec 2000 23:09:02 -0000 1.15
+++ ttyaction.c 20 Mar 2004 03:42:57 -0000
@@ -144,6 +144,7 @@
/* If we get here, it is an error. */
warnx("%s: line %d: exec failed: %s",
actfile, linenum, strerror(errno));
+ fclose(fp);
_exit(1);
}
/* This is the parent. */
>Release-Note:
>Audit-Trail:
>Unformatted: