From: Arend Van Spriel <arend.vanspriel@broadcom.com>
To: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>,
linux-wireless@vger.kernel.org
Cc: kvalo@codeaurora.org, johannes.berg@intel.com, hofrat@osadl.org,
xypron.glpk@gmx.de,
Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
Subject: Re: [PATCH 1/1] rsi: fix memory leak in debugfs entry and supported bands
Date: Tue, 20 Sep 2016 14:27:19 +0200 [thread overview]
Message-ID: <bf37845b-81d2-2e99-15d3-caef2d1f59eb@broadcom.com> (raw)
In-Reply-To: <1474353784-9552-1-git-send-email-prameela.j04cs@gmail.com>
On 20-9-2016 8:43, Prameela Rani Garnepudi wrote:
> From: Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
>
> Signed-off-by: Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Now you are exaggerating ;-) One of these should be sufficient. Instead
some descriptive text in the commit message is required. Describe the
scenario in which the memory is leaked, ie. during driver unload.
> ---
> drivers/net/wireless/rsi/rsi_91x_mac80211.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
> index dbb2389..dc64532 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
> @@ -194,6 +194,7 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band)
> void rsi_mac80211_detach(struct rsi_hw *adapter)
> {
> struct ieee80211_hw *hw = adapter->hw;
> + int i;
>
> if (hw) {
> ieee80211_stop_queues(hw);
> @@ -201,7 +202,16 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
> ieee80211_free_hw(hw);
> }
>
> + for (i = 0; i < 2; i++) {
Use NUM_NL80211_BANDS instead of hardcoded value.
Regards,
Arend
> + struct ieee80211_supported_band *sbands = &adapter->sbands[i];
> +
> + kfree(sbands->channels);
> + }
prev parent reply other threads:[~2016-09-20 12:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 6:43 [PATCH 1/1] rsi: fix memory leak in debugfs entry and supported bands Prameela Rani Garnepudi
2016-09-20 12:27 ` Arend Van Spriel [this message]
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=bf37845b-81d2-2e99-15d3-caef2d1f59eb@broadcom.com \
--to=arend.vanspriel@broadcom.com \
--cc=hofrat@osadl.org \
--cc=johannes.berg@intel.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=prameela.garnepudi@redpinesignals.com \
--cc=prameela.j04cs@gmail.com \
--cc=xypron.glpk@gmx.de \
/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