diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-01-13 01:41:59 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-01-13 01:41:59 +0000 |
commit | 1ea287946b9b4365ed4a24762f35732c4283b716 (patch) | |
tree | 9c0e87b12950d726deee01ac781fd615c9317477 /sbin/pfctl | |
parent | ca27f3b53d7f8a09583536ec7ed7dbccd2921278 (diff) |
fix some leaks found by parfait
ok mcbride@ henning@
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/pfctl.c | 4 | ||||
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 4 |
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); } |