diff options
author | Patrick Latifi <pat@cvs.openbsd.org> | 2006-05-31 02:16:26 +0000 |
---|---|---|
committer | Patrick Latifi <pat@cvs.openbsd.org> | 2006-05-31 02:16:26 +0000 |
commit | ee62d3eade88eba53c2911279f0adb184a55a1a8 (patch) | |
tree | afdccca9a981f8eaa0c120fea43106bf5a9b536b /usr.sbin | |
parent | 11f7601fe8f6ba0c18c57a83b4e624e78255baed (diff) |
Plug memory leaks in error path; ok henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/parse.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 4f54d9c561c..23981247e33 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.189 2006/05/26 01:06:12 deraadt Exp $ */ +/* $OpenBSD: parse.y,v 1.190 2006/05/31 02:16:25 pat Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1420,6 +1420,7 @@ filter_set_opt : LOCALPREF number { pftable_exists($2) != 0) { yyerror("pftable name does not exist"); free($2); + free($$); YYERROR; } if (strlcpy($$->action.pftable, $2, @@ -1427,11 +1428,13 @@ filter_set_opt : LOCALPREF number { sizeof($$->action.pftable)) { yyerror("pftable name too long"); free($2); + free($$); YYERROR; } if (pftable_add($2) != 0) { yyerror("Couldn't register table"); free($2); + free($$); YYERROR; } free($2); @@ -1445,6 +1448,7 @@ filter_set_opt : LOCALPREF number { sizeof($$->action.rtlabel)) { yyerror("rtlabel name too long"); free($2); + free($$); YYERROR; } free($2); |