diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2018-04-13 14:09:43 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2018-04-13 14:09:43 +0000 |
commit | 216d430819b9f21abf9586805792145662d678e5 (patch) | |
tree | 4dade6d31e311879f2f42b54abb5cd32477b14cc /sys/net/pf_ioctl.c | |
parent | c321ab2bbd2db9e162a11bee57311435c99df411 (diff) |
Remove compatibility with pfctl from 6.1 and plug a few leaks
No objections from henning, OK visa
Diffstat (limited to 'sys/net/pf_ioctl.c')
-rw-r--r-- | sys/net/pf_ioctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index c418b2e9529..cc1003ecf0a 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.332 2018/04/05 03:28:20 lteo Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.333 2018/04/13 14:09:42 mikeb Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1141,6 +1141,12 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) } memcpy(qs, &q->queue, sizeof(*qs)); qs->qid = pf_qname2qid(qs->qname, 1); + if (qs->qid == 0) { + pool_put(&pf_queue_pl, qs); + error = EBUSY; + PF_UNLOCK(); + break; + } if (qs->parent[0] && (qs->parent_qid = pf_qname2qid(qs->parent, 0)) == 0) { pool_put(&pf_queue_pl, qs); |