diff options
author | kp <kp@FreeBSD.org> | 2017-04-08 09:49:21 +0000 |
---|---|---|
committer | kp <kp@FreeBSD.org> | 2017-04-08 09:49:21 +0000 |
commit | 839fc14cddcc12e5e43c2bec33327f9d8faa6b12 (patch) | |
tree | d5fe447c3b1df84076bdd810b91d0800be31ccb9 | |
parent | 13c5e954cc5c458ce610778be5eee6514f6fe6a0 (diff) | |
download | FreeBSD-src-839fc14cddcc12e5e43c2bec33327f9d8faa6b12.zip FreeBSD-src-839fc14cddcc12e5e43c2bec33327f9d8faa6b12.tar.gz |
MFC r316355
pf: Fix leak of pf_state_keys
If we hit the state limit we returned from pf_create_state() without cleaning
up.
PR: 217997
Submitted by: Max <maximos@als.nnov.ru>
-rw-r--r-- | sys/netpfil/pf/pf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 3d76a76..863ab8c 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -3522,7 +3522,7 @@ pf_create_state(struct pf_rule *r, struct pf_rule *nr, struct pf_rule *a, (counter_u64_fetch(r->states_cur) >= r->max_states)) { counter_u64_add(V_pf_status.lcounters[LCNT_STATES], 1); REASON_SET(&reason, PFRES_MAXSTATES); - return (PF_DROP); + goto csfailed; } /* src node for filter rule */ if ((r->rule_flag & PFRULE_SRCTRACK || |