summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/parse.y
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-11-05 14:30:55 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-11-05 14:30:55 +0000
commitdbdbb49bc9274870d2aecaea15169c6d21d9f97e (patch)
treef3d7e5d456d20d2e7c6b9011d6938cce51b62cc3 /usr.sbin/bgpd/parse.y
parent77f793209538fb47d4c6ca5f8936e416a5d47483 (diff)
memleaks in error pathes, again awesome work from Patrick Latifi
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 b8453aff4d5..00cf094584d 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.142 2004/11/04 14:05:46 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.143 2004/11/05 14:30:54 henning Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -862,6 +862,7 @@ filter_peer : ANY {
}
if ($$->p.peerid == 0) {
yyerror("no such peer: %s", log_addr(&$1));
+ free($$);
YYERROR;
}
}
@@ -881,6 +882,7 @@ filter_peer : ANY {
if ($$->p.groupid == 0) {
yyerror("no such group: \"%s\"", $2);
free($2);
+ free($$);
YYERROR;
}
free($2);