Skip to content

Commit

Permalink
rt61pci: rt61pci_beacon_update do not free skb twice
Browse files Browse the repository at this point in the history
The layer above will free the skb in an error case.

Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Daniel Wagner authored and John W. Linville committed Apr 9, 2008
1 parent 2633da2 commit e91e9d4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/wireless/rt2x00/rt61pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2399,10 +2399,8 @@ 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;
}
}

/*
Expand Down

0 comments on commit e91e9d4

Please sign in to comment.