summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bgpd/parse.y8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 7f9ad037a5d..c5a0e5ac1c7 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.99 2004/04/30 17:34:05 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.100 2004/05/04 11:34:01 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -835,15 +835,17 @@ filter_match : /* empty */ { bzero(&$$, sizeof($$)); }
free($2);
YYERROR;
}
- free($2);
if (i == 0 || i == USHRT_MAX) {
- yyerror("Bad community as number");
+ free($2);
+ yyerror("Bad community AS number");
YYERROR;
}
$$.community.as = i;
if ((i = getcommunity(p)) == COMMUNITY_ERROR) {
+ free($2);
YYERROR;
}
+ free($2);
$$.community.type = i;
}
;