summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2004-01-05 19:14:41 +0000
committerhenning <henning@openbsd.org>2004-01-05 19:14:41 +0000
commitf67882cf686eece55114c02e6cda962779771775 (patch)
tree54dfa0372d3eaebd2dae3d85dbd8691c852a84d7
parentcorrectly handle SIGCHLD. (diff)
downloadwireguard-openbsd-f67882cf686eece55114c02e6cda962779771775.tar.xz
wireguard-openbsd-f67882cf686eece55114c02e6cda962779771775.zip
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);