mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 08:12:27 -04:00
pf: add missing unlock
If we fail to unshare the mbuf we forgot to unlock the rules.
Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
3e2a7a2cbe
commit
81f7ad324d
1 changed files with 3 additions and 1 deletions
|
|
@ -9043,8 +9043,10 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0
|
|||
|
||||
if (__predict_false(! M_WRITABLE(*m0))) {
|
||||
*m0 = m_unshare(*m0, M_NOWAIT);
|
||||
if (*m0 == NULL)
|
||||
if (*m0 == NULL) {
|
||||
PF_RULES_RUNLOCK();
|
||||
return (PF_DROP);
|
||||
}
|
||||
}
|
||||
|
||||
pf_init_pdesc(&pd, *m0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue