From: Amitkumar Karwar Date: Fri, 30 Jan 2015 08:40:05 +0000 (-0800) Subject: mwifiex: fix memory leak in mwifiex_send_processed_packet() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7a1f4e61eb6417aecd20822a5f15e72d21c7f3f9;p=linux-beck.git mwifiex: fix memory leak in mwifiex_send_processed_packet() Memory is leaked after downloading already processed packet. This patch fixes the problem by freeing returned skb. Other transmit paths don't have this problem. Signed-off-by: Amitkumar Karwar Signed-off-by: Cathy Luo Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c index ffffd2c5a76e..ef717acec8b7 100644 --- a/drivers/net/wireless/mwifiex/wmm.c +++ b/drivers/net/wireless/mwifiex/wmm.c @@ -1228,6 +1228,9 @@ mwifiex_send_processed_packet(struct mwifiex_private *priv, case -EINPROGRESS: if (adapter->iface_type != MWIFIEX_PCIE) adapter->data_sent = false; + break; + case 0: + mwifiex_write_data_complete(adapter, skb, 0, ret); default: break; }