提交 cbf7f305 编写于 作者: J Juuso Oikarinen 提交者: John W. Linville

wl1271: Fix memory leak in firmware crash scenario

The driver tx-queue flush operation leaks broadcast-frames. This leak occurs
if the driver is shut down while there are frames in TX buffers (such as in
a firmware crash scenario.) Fix the leak.
Signed-off-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: NTeemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: NLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 64e29e44
......@@ -426,8 +426,10 @@ void wl1271_tx_flush(struct wl1271 *wl)
wl1271_debug(DEBUG_TX, "flushing skb 0x%p", skb);
if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS))
continue;
if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
kfree_skb(skb);
continue;
}
ieee80211_tx_status(wl->hw, skb);
}
......@@ -437,8 +439,10 @@ void wl1271_tx_flush(struct wl1271 *wl)
skb = wl->tx_frames[i];
info = IEEE80211_SKB_CB(skb);
if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS))
if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
kfree_skb(skb);
continue;
}
ieee80211_tx_status(wl->hw, skb);
wl->tx_frames[i] = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册