aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2008-10-28 00:14:38 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:51:44 -0800
commit16d3659fcda922a31873e9e827b12c825b36fd11 (patch)
treefcd838edae81600573303a75411b3785b5db447b /drivers
parent3c01ec0d82885d4764d066c9a1e3a431e6fb0f04 (diff)
Staging: w35und: plug memory leak in wbsoft_tx()
There's no reason to duplicate the skb in wbsoft_tx() and leak GFP_ATOMIC memory as the contents are copied to ->TxBuffer in MdxTx() anyway before MLMESendFrame() returns. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/winbond/linux/wbusb.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/winbond/linux/wbusb.c b/drivers/staging/winbond/linux/wbusb.c
index d9c3a16c415..75213b53a49 100644
--- a/drivers/staging/winbond/linux/wbusb.c
+++ b/drivers/staging/winbond/linux/wbusb.c
@@ -107,11 +107,8 @@ static void wbsoft_configure_filter(struct ieee80211_hw *dev,
static int wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
{
- char *buffer = kmalloc(skb->len, GFP_ATOMIC);
- printk("Sending frame %d bytes\n", skb->len);
- memcpy(buffer, skb->data, skb->len);
- if (1 == MLMESendFrame(my_adapter, buffer, skb->len, FRAME_TYPE_802_11_MANAGEMENT))
- printk("frame sent ok (%d bytes)?\n", skb->len);
+ MLMESendFrame(my_adapter, skb->data, skb->len, FRAME_TYPE_802_11_MANAGEMENT);
+
return NETDEV_TX_OK;
}