diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-25 18:35:18 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-25 18:35:18 +0000 |
commit | 8e9c251b291097cf3ef82e6e25a5a1639b51f5b1 (patch) | |
tree | 811fa87e4a125a2d9b456eac8fe48277d15b3eb5 | |
parent | c6ee80c2d3679a70eb4dba77fd6e1ca3349073a6 (diff) |
must not remove macros vis cmdline after parsinf is done, we will need them
again on reload
-rw-r--r-- | usr.sbin/bgpd/parse.y | 12 |
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); |