summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/bgpd.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-03-28 15:03:34 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-03-28 15:03:34 +0000
commit39a9e425075971f0ea56cca7ccac92c64b8f8a8e (patch)
tree076934ea967a67637d648e6b628116353a3444dc /usr.sbin/bgpd/bgpd.c
parent542f6cafd3234a53a4fed511e94902355ec9792c (diff)
free rules_l if the initial config file parse fails
Diffstat (limited to 'usr.sbin/bgpd/bgpd.c')
-rw-r--r--usr.sbin/bgpd/bgpd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c
index 062333387f6..aa1172540dc 100644
--- a/usr.sbin/bgpd/bgpd.c
+++ b/usr.sbin/bgpd/bgpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.c,v 1.114 2005/03/24 02:39:16 tedu Exp $ */
+/* $OpenBSD: bgpd.c,v 1.115 2005/03/28 15:03:33 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -153,8 +153,10 @@ main(int argc, char *argv[])
}
}
- if (parse_config(conffile, &conf, &mrt_l, &peer_l, &net_l, rules_l))
+ if (parse_config(conffile, &conf, &mrt_l, &peer_l, &net_l, rules_l)) {
+ free(rules_l);
exit(1);
+ }
if (conf.opts & BGPD_OPT_NOACTION) {
if (conf.opts & BGPD_OPT_VERBOSE)