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>
MFC after:	1 week
This commit is contained in:
Kristof Provost 2017-04-01 12:22:34 +00:00
parent ec5c0e5be9
commit 3601d25181
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316355

View File

@ -3559,7 +3559,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 ||