summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/parse.y
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-08-02 21:30:56 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-08-02 21:30:56 +0000
commit965e18722dbf9ccb41ad3d83beaa397d732300fb (patch)
tree5b96ddea01e42d3fdab03ed9818f17f86af9176f /usr.sbin/bgpd/parse.y
parentdcc00a38ae76b3d8cf50618482bbfb79cbaa82a8 (diff)
Fix a possible mem leak and add a missing yyerror(). OK henning@
Diffstat (limited to 'usr.sbin/bgpd/parse.y')
-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 0947501c2e7..1d0ab4cf87d 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.128 2004/07/30 14:44:30 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.129 2004/08/02 21:30:55 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -541,6 +541,7 @@ peeropts : REMOTEAS asnumber {
curpeer->conf.announce_type =
ANNOUNCE_DEFAULT_ROUTE;
else {
+ yyerror("invalid announce type");
free($2);
YYERROR;
}
@@ -993,6 +994,7 @@ filter_elm : filter_prefix_h {
| COMMUNITY STRING {
if (fmopts.m.community.as) {
yyerror("\"community\" already specified");
+ free($2);
YYERROR;
}
if (parsecommunity($2, &fmopts.m.community.as,