rmind / npf

NPF: packet filter with stateful inspection, NAT, IP sets, etc.
Other
237 stars 42 forks source link

Drop redundant NULL check before m_freem(9) #134

Open rokuyama opened 6 days ago

rokuyama commented 6 days ago

For NetBSD, we are dropping redundant NULL check before m_freem(9), which improves code readability a little bit; m_freem(9) has accepted NULL argument at least since 4.2BSD.

For NPF, standalone version of m_freem(9), npfkern_m_freem(), does not work for NULL input.

This PR fixes npfkern_m_freem() to accept NULL. Then, drop NULL check before m_freem(9) as done for NetBSD.