summaryrefslogtreecommitdiff
path: root/usr.sbin/config/mkmakefile.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-06-04 07:14:30 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-06-04 07:14:30 +0000
commit29693186182e231df733e80c861920463f97ed5b (patch)
tree054697a3b3368157648ef216e9a3d848218e510c /usr.sbin/config/mkmakefile.c
parenta0d2e35b7377678f54df814f60802686397312f9 (diff)
fix a fd leak in an error path
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r--usr.sbin/config/mkmakefile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 80886956084..0f497f568cf 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkmakefile.c,v 1.39 2013/11/23 17:38:15 deraadt Exp $ */
+/* $OpenBSD: mkmakefile.c,v 1.40 2014/06/04 07:14:29 jsg Exp $ */
/* $NetBSD: mkmakefile.c,v 1.34 1997/02/02 21:12:36 thorpej Exp $ */
/*
@@ -91,6 +91,7 @@ mkmakefile(void)
(void)fprintf(stderr, "config: cannot write Makefile: %s\n",
strerror(errno));
free(ifname);
+ (void)fclose(ifp);
return (1);
}
if (emitdefs(ofp) != 0)