提交 e91e9d49 编写于 作者: D Daniel Wagner 提交者: John W. Linville

rt61pci: rt61pci_beacon_update do not free skb twice

The layer above will free the skb in an error case.
Signed-off-by: NDaniel Wagner <wagi@monom.org>
Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 2633da23
......@@ -2399,11 +2399,9 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
* beacon frame.
*/
if (skb_headroom(skb) < TXD_DESC_SIZE) {
if (pskb_expand_head(skb, TXD_DESC_SIZE, 0, GFP_ATOMIC)) {
dev_kfree_skb(skb);
if (pskb_expand_head(skb, TXD_DESC_SIZE, 0, GFP_ATOMIC))
return -ENOMEM;
}
}
/*
* Add the descriptor in front of the skb.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册