summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-03-08 10:33:35 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-03-08 10:33:35 +0000
commitfb6813f2ec9f9b0add86fa73d580b4b7596d9bc4 (patch)
treef8a8626e0d030fd80329962bc8ae72421510b77f /usr.sbin/bgpd
parent311fc5eb89b3af954c24173a8eb0466bcf000401 (diff)
typo in format strin (ugh!) and few missing free()s, partitially from
Patrick Latifi
Diffstat (limited to 'usr.sbin/bgpd')
-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);
}
;