mwifiex: add a kfree() to an error path
Subsystems (2)
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 <[email protected]>
drivers/net/wireless/mwifiex/sta_ioctl.c +1 -0
@@ -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 ; }
Hi Dan,
Thanks for the patch.
Quoted 11 lines
-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Wednesday, September 21, 2011 12:13 AM
To: Bing Zhao
Cc: John W. Linville; [email protected]; [email protected]
Subject: [patch 1/2] mwifiex: add akfree()to an error pathWe'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 <[email protected]>
Acked-by Bing Zhao <[email protected]>
Thanks,
Bing
Quoted 13 lines
drivers/net/wireless/mwifiex/sta_ioctl.c +1
-0@@ -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 ; }