summaryrefslogtreecommitdiff
path: root/sbin/pfctl
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/pfctl')
-rw-r--r--sbin/pfctl/pfctl.c4
-rw-r--r--sbin/pfctl/pfctl_parser.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 23d0129a372..3681d43faee 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl.c,v 1.292 2010/01/12 03:20:51 mcbride Exp $ */
+/* $OpenBSD: pfctl.c,v 1.293 2010/01/13 01:41:58 jsg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1283,6 +1283,8 @@ pfctl_rules(int dev, char *filename, int opts, int optimize,
goto _error;
}
+ free(path);
+
if ((altqsupport && (pf.loadopt & PFCTL_FLAG_ALTQ) != 0))
if (check_commit_altq(dev, opts) != 0)
ERRX("errors in altq config");
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index 8c902591479..af236f89562 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.259 2010/01/12 16:21:24 mcbride Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.260 2010/01/13 01:41:58 jsg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1417,6 +1417,8 @@ host(const char *s)
err(1, "host: strdup");
mask = strtol(p+1, &q, 0);
if (!q || *q || mask > 128 || q == (p+1)) {
+ free(p);
+ free(r);
fprintf(stderr, "invalid netmask '%s'\n", p);
return (NULL);
}