summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2014-04-21 17:33:32 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2014-04-21 17:33:32 +0000
commit27d8653b958231d55281025077929a5d681cb2e5 (patch)
tree0e3c527e88701013cddefd2aae2368259bc47273
parent52253d1cb4f03c64cf76e38e25fea2d431413c63 (diff)
Add a few missing free's in the grammar.
-rw-r--r--usr.sbin/relayd/parse.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index 0c4d3971247..5853d7e5474 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.178 2014/04/20 18:16:11 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.179 2014/04/21 17:33:31 reyk Exp $ */
/*
* Copyright (c) 2007-2011 Reyk Floeter <reyk@openbsd.org>
@@ -417,6 +417,7 @@ rdr : REDIRECT STRING {
sizeof(srv->conf.name)) >=
sizeof(srv->conf.name)) {
yyerror("redirection name truncated");
+ free($2);
free(srv);
YYERROR;
}
@@ -470,11 +471,13 @@ rdroptsl : forwardmode TO tablespec interface {
if ($4 == NULL)
break;
yyerror("superfluous interface");
+ free($4);
YYERROR;
case FWD_ROUTE:
if ($4 != NULL)
break;
yyerror("missing interface to route to");
+ free($4);
YYERROR;
case FWD_TRANS:
yyerror("no transparent forward here");
@@ -866,6 +869,7 @@ proto : relay_proto PROTO STRING {
if (strlcpy(p->name, $3, sizeof(p->name)) >=
sizeof(p->name)) {
yyerror("protocol name truncated");
+ free($3);
free(p);
YYERROR;
}
@@ -1314,6 +1318,7 @@ relay : RELAY STRING {
sizeof(r->rl_conf.name)) >=
sizeof(r->rl_conf.name)) {
yyerror("relay name truncated");
+ free($2);
free(r);
YYERROR;
}