[usr/src/bin/sh/mknodes.c:269]: (error) Resource leak: cfile [usr/src/bin/sh/mknodes.c:269]: (error) Resource leak: hfile [usr/src/bin/sh/mknodes.c:269]: (error) Resource leak: patfile $ egrep "fopen|fclose" usr/src/bin/sh/mknodes.c if ((infp = fopen(argv[1], "r")) == NULL) if ((patfile = fopen(file, "r")) == NULL) if ((hfile = fopen("nodes.h", "w")) == NULL) if ((cfile = fopen("nodes.c", "w")) == NULL) $
This is a valid bug. The practical effect is that the program does not check for errors from fclose() on a file that was written to.
A commit references this bug: Author: jilles Date: Sun Dec 20 16:40:37 UTC 2015 New revision: 292517 URL: https://svnweb.freebsd.org/changeset/base/292517 Log: sh/mknodes: Close files and check for errors when writing. This is a build tool only and does not affect run time. PR: 204951 MFC after: 1 week Changes: head/bin/sh/mknodes.c
A commit references this bug: Author: jilles Date: Sun Dec 27 17:53:39 UTC 2015 New revision: 292786 URL: https://svnweb.freebsd.org/changeset/base/292786 Log: MFC r292517: sh/mknodes: Close files and check for errors when writing. This is a build tool only and does not affect run time. PR: 204951 Changes: _U stable/10/ stable/10/bin/sh/mknodes.c