linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/2] mwifiex: add a kfree() to an error path
@ 2011-09-21  7:13 Dan Carpenter
  2011-09-21 18:05 ` Bing Zhao
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-09-21  7:13 UTC (permalink / raw)
  To: Bing Zhao; +Cc: John W. Linville, linux-wireless, kernel-janitors

We're not likely to hit this small memory leak, but lets fix it
anyway to keep the static checkers happy.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index eb569fa..215c65a 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -203,6 +203,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
 		beacon_ie = kmemdup(bss->information_elements,
 					bss->len_beacon_ies, GFP_KERNEL);
 		if (!beacon_ie) {
+			kfree(bss_desc);
 			dev_err(priv->adapter->dev, " failed to alloc beacon_ie\n");
 			return -ENOMEM;
 		}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [patch 1/2] mwifiex: add a kfree() to an error path
  2011-09-21  7:13 [patch 1/2] mwifiex: add a kfree() to an error path Dan Carpenter
@ 2011-09-21 18:05 ` Bing Zhao
  0 siblings, 0 replies; 2+ messages in thread
From: Bing Zhao @ 2011-09-21 18:05 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: John W. Linville, linux-wireless@vger.kernel.org,
	kernel-janitors@vger.kernel.org

Hi Dan,

Thanks for the patch.

> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Wednesday, September 21, 2011 12:13 AM
> To: Bing Zhao
> Cc: John W. Linville; linux-wireless@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [patch 1/2] mwifiex: add a kfree() to an error path
> 
> We're not likely to hit this small memory leak, but lets fix it
> anyway to keep the static checkers happy.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Bing Zhao <bzhao@marvell.com>

Thanks,
Bing

> 
> diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
> index eb569fa..215c65a 100644
> --- a/drivers/net/wireless/mwifiex/sta_ioctl.c
> +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
> @@ -203,6 +203,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
>  		beacon_ie = kmemdup(bss->information_elements,
>  					bss->len_beacon_ies, GFP_KERNEL);
>  		if (!beacon_ie) {
> +			kfree(bss_desc);
>  			dev_err(priv->adapter->dev, " failed to alloc beacon_ie\n");
>  			return -ENOMEM;
>  		}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-21 18:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-21  7:13 [patch 1/2] mwifiex: add a kfree() to an error path Dan Carpenter
2011-09-21 18:05 ` Bing Zhao

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).