summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2003-12-25 18:35:17 +0000
committerhenning <henning@openbsd.org>2003-12-25 18:35:17 +0000
commitcf9ffb1b87415354e906055839c5546acf41c24a (patch)
treeecc5696427a07a1e2b69eaa3dd092e0ab7d216f7
parentBoy, this has grown. 600MB in 2.7 to almost 3GB today. (diff)
downloadwireguard-openbsd-cf9ffb1b87415354e906055839c5546acf41c24a.tar.xz
wireguard-openbsd-cf9ffb1b87415354e906055839c5546acf41c24a.zip
must not remove macros vis cmdline after parsinf is done, we will need them
again on reload
-rw-r--r--usr.sbin/bgpd/parse.y12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 319a71239ee..586cc6ff6a6 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.16 2003/12/25 18:04:10 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.17 2003/12/25 18:35:17 henning Exp $ */
/*
* Copyright (c) 2002, 2003 Henning Brauer <henning@openbsd.org>
@@ -568,10 +568,12 @@ parse_config(char *filename, struct bgpd_config *xconf,
if ((conf->opts & BGPD_OPT_VERBOSE2) && !sym->used)
fprintf(stderr, "warning: macro '%s' not "
"used\n", sym->nam);
- free(sym->nam);
- free(sym->val);
- TAILQ_REMOVE(&symhead, sym, entries);
- free(sym);
+ if (!sym->persist) {
+ free(sym->nam);
+ free(sym->val);
+ TAILQ_REMOVE(&symhead, sym, entries);
+ free(sym);
+ }
}
errors += merge_config(xconf, conf);