summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ipw/if_ipw.c4
-rw-r--r--sys/dev/iwi/if_iwi.c4
-rw-r--r--sys/dev/ral/if_ral.c4
-rw-r--r--sys/dev/usb/if_ural.c4
4 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c
index bab7a72..7a52d32 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 e6aa051..35d9674 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 9e6cf74..9877a3d 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 5589222..758edc0 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 *);
OpenPOWER on IntegriCloud