From: Amitkumar Karwar <akarwar@marvell.com>
To: <linux-wireless@vger.kernel.org>
Cc: Cathy Luo <cluo@marvell.com>, Avinash Patil <patila@marvell.com>,
Amitkumar Karwar <akarwar@marvell.com>
Subject: [PATCH 2/4] mwifiex: fix memory leak in mwifiex_send_processed_packet()
Date: Fri, 30 Jan 2015 00:40:05 -0800 [thread overview]
Message-ID: <1422607207-15229-2-git-send-email-akarwar@marvell.com> (raw)
In-Reply-To: <1422607207-15229-1-git-send-email-akarwar@marvell.com>
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 <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
---
drivers/net/wireless/mwifiex/wmm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c
index ffffd2c..ef717ac 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;
}
--
1.8.1.4
next prev parent reply other threads:[~2015-01-30 8:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 8:40 [PATCH 1/4] mwifiex: correction in wakeup timer handling Amitkumar Karwar
2015-01-30 8:40 ` Amitkumar Karwar [this message]
2015-01-30 8:40 ` [PATCH 3/4] mwifiex: fix NULL packet downloading issues Amitkumar Karwar
2015-01-30 8:40 ` [PATCH 4/4] mwifiex: disable UAPSD mode when AP starts Amitkumar Karwar
2015-02-03 13:29 ` [1/4] mwifiex: correction in wakeup timer handling Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422607207-15229-2-git-send-email-akarwar@marvell.com \
--to=akarwar@marvell.com \
--cc=cluo@marvell.com \
--cc=linux-wireless@vger.kernel.org \
--cc=patila@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).