summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-02-26 15:14:59 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-02-26 15:14:59 +0000
commit60d6de4242d10f47a209df2303d4335ba27f47b9 (patch)
tree333812f2e068389e6076db8d14d4a8e652ff11cf
parentde82f8d3f6bc1bd9b4a8711c4c8178650f3375e8 (diff)
ypu sure get the impression the number of memory leaks in error pathes
is infinite... Andrey Matveev <andrushock@korovino.net> spotted a few again!
-rw-r--r--sbin/pfctl/parse.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 76b25e51756..66d937b0091 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.477 2005/02/07 18:18:14 david Exp $ */
+/* $OpenBSD: parse.y,v 1.478 2005/02/26 15:14:58 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -924,6 +924,7 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af antispoof_opts {
if (strlcpy(h->addr.v.ifname, i->ifname,
sizeof(h->addr.v.ifname)) >=
sizeof(h->addr.v.ifname)) {
+ free(h);
yyerror(
"interface name too long");
YYERROR;
@@ -1919,11 +1920,13 @@ filter_opt : USER uids {
}
if (*e) {
yyerror("invalid probability: %s", $2);
+ free($2);
YYERROR;
}
p = floor(p * (UINT_MAX+1.0) + 0.5);
if (p < 1.0 || p >= (UINT_MAX+1.0)) {
yyerror("invalid probability: %s", $2);
+ free($2);
YYERROR;
}
filter_opts.prob = (u_int32_t)p;