summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bgpd/parse.y10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 31adefd60dd..5024583a11e 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.71 2004/03/06 21:41:44 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.72 2004/03/08 10:33:34 henning Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -233,8 +233,10 @@ conf_main : AS asnumber {
| LOG string {
if (!strcmp($2, "updates"))
conf->log |= BGPD_LOG_UPDATES;
- else
+ else {
+ free($2);
YYERROR;
+ }
free($2);
}
| NETWORK prefix filter_set {
@@ -312,7 +314,7 @@ prefix : STRING '/' number {
if (!host(s, &$$.prefix, &$$.len)) {
free(s);
- yyerror("could not parse address \"%s/%s\"",
+ yyerror("could not parse address \"%s/%u\"",
$1, $3);
YYERROR;
}
@@ -564,8 +566,10 @@ filter_peer : ANY { $$.peerid = $$.groupid = 0; }
}
if ($$.groupid == 0) {
yyerror("no such group: \"%s\"", $2);
+ free($2);
YYERROR;
}
+ free($2);
}
;