On Thu, Dec 10, 2020 at 03:29:39PM +0800, zxystd wrote:
> The input packet shall be a mbuf chain so we should not only free the single
> mbuf.
> Alought it is a error path we should not go to.
> ---
> sys/net80211/ieee80211_crypto.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Yes, this fix is right. Thank you!
I will see about getting this committed.
Cheers,
Stefan
> diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c
> index 98878f1aa8f..f732416ba24 100644
> --- a/sys/net80211/ieee80211_crypto.c
> +++ b/sys/net80211/ieee80211_crypto.c
> @@ -290,7 +290,7 @@ ieee80211_decrypt(struct ieee80211com *ic, struct mbuf
> *m0,
> /* find key for decryption */
> k = ieee80211_get_rxkey(ic, m0, ni);
> if (k == NULL || (k->k_flags & IEEE80211_KEY_SWCRYPTO) == 0) {
> - m_free(m0);
> + m_freem(m0);
> return NULL;
> }
>
> --
> 2.24.3