Commit e91e9d49 authored by Daniel Wagner's avatar Daniel Wagner Committed by 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: default avatarDaniel Wagner <wagi@monom.org>
Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment