summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-05 19:14:42 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-05 19:14:42 +0000
commitb988c8715376c3ea0bdba11f0761286ccc0a1bed (patch)
treed54db92f96a3ae5ceaf8b2171c2e0eee1e23dd78
parentb23fd4b94033681d702393178a99a2a173e00950 (diff)
missing fclose()
fd leak pointed out by Patrick Latifi, but it was not so easy to fix before I just killed the support for config from stdin and his fix didn't work. however, this is the 16 bytes memory leak on config reload i was hunting for some time, big thanks to Patrick!
-rw-r--r--usr.sbin/bgpd/parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index d0e5c6d4557..a0afb14a334 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.28 2004/01/05 19:06:42 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.29 2004/01/05 19:14:41 henning Exp $ */
/*
* Copyright (c) 2002, 2003 Henning Brauer <henning@openbsd.org>
@@ -580,6 +580,8 @@ parse_config(char *filename, struct bgpd_config *xconf,
yyparse();
+ fclose(fin);
+
/* Free macros and check which have not been used. */
for (sym = TAILQ_FIRST(&symhead); sym != NULL; sym = next) {
next = TAILQ_NEXT(sym, entries);