From 29693186182e231df733e80c861920463f97ed5b Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Wed, 4 Jun 2014 07:14:30 +0000 Subject: fix a fd leak in an error path --- usr.sbin/config/mkmakefile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin/config/mkmakefile.c') 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) -- cgit v1.2.3