summaryrefslogtreecommitdiffstats
path: root/sys/dev/ral
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-07-07 02:55:04 +0000
committersam <sam@FreeBSD.org>2005-07-07 02:55:04 +0000
commitee0f352bd101a476fd21844fbdee59d29a026442 (patch)
treec1b7d951e4616bcb565679b8737c31495aa556d5 /sys/dev/ral
parent5b31b99954daa585036b676ec1e9271df6ab4fa7 (diff)
downloadFreeBSD-src-ee0f352bd101a476fd21844fbdee59d29a026442.zip
FreeBSD-src-ee0f352bd101a476fd21844fbdee59d29a026442.tar.gz
reclaim mbuf when ieee80211_crypto_encap fails
Approved by: re (scottl) Obtained from: netbsd
Diffstat (limited to 'sys/dev/ral')
-rw-r--r--sys/dev/ral/if_ral.c4
1 files changed, 3 insertions, 1 deletions
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 *);
OpenPOWER on IntegriCloud