diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c index bab7a72603e4..7a52d32cd17c 100644 --- a/sys/dev/ipw/if_ipw.c +++ b/sys/dev/ipw/if_ipw.c @@ -1321,8 +1321,10 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni) if (wh->i_fc[1] & IEEE80211_FC1_WEP) { k = ieee80211_crypto_encap(ic, ni, m0); - if (k == NULL) + if (k == NULL) { + m_freem(m0); return ENOBUFS; + } /* packet header may have moved, reset our local pointer */ wh = mtod(m0, struct ieee80211_frame *); diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index e6aa051c7c5c..35d9674e28f7 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -1355,8 +1355,10 @@ iwi_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni) bcopy(mtod(m0, struct ieee80211_frame *), &wh, sizeof (struct ieee80211_frame)); if (wh.i_fc[1] & IEEE80211_FC1_WEP) { k = ieee80211_crypto_encap(ic, ni, m0); - if (k == NULL) + if (k == NULL) { + m_freem(m0); return ENOBUFS; + } } if (sc->sc_drvbpf != NULL) { diff --git a/sys/dev/ral/if_ral.c b/sys/dev/ral/if_ral.c index 9e6cf74b53ae..9877a3dceb70 100644 --- a/sys/dev/ral/if_ral.c +++ b/sys/dev/ral/if_ral.c @@ -1900,8 +1900,10 @@ ral_tx_data(struct ral_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) if (wh->i_fc[1] & IEEE80211_FC1_WEP) { k = ieee80211_crypto_encap(ic, ni, m0); - if (k == NULL) + if (k == NULL) { + m_freem(m0); return ENOBUFS; + } /* packet header may have moved, reset our local pointer */ wh = mtod(m0, struct ieee80211_frame *); diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c index 55892220eb18..758edc08cf6c 100644 --- a/sys/dev/usb/if_ural.c +++ b/sys/dev/usb/if_ural.c @@ -1202,8 +1202,10 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) if (wh->i_fc[1] & IEEE80211_FC1_WEP) { k = ieee80211_crypto_encap(ic, ni, m0); - if (k == NULL) + if (k == NULL) { + m_freem(m0); return ENOBUFS; + } /* packet header may have moved, reset our local pointer */ wh = mtod(m0, struct ieee80211_frame *);