summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2011-09-21 07:13:29 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2011-09-21 20:19:44 (GMT)
commitaef0ba54ecb961ae559106540f37ab734b64410d (patch)
treec843e86fccd74a5c50cf632a356e937590f09a36 /drivers/net/wireless/mwifiex
parent5adcb81037558aa545676f78dea2b2ce6c3b5819 (diff)
downloadlinux-fsl-qoriq-aef0ba54ecb961ae559106540f37ab734b64410d.tar.xz
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r--drivers/net/wireless/mwifiex/sta_ioctl.c1
1 files changed, 1 insertions, 0 deletions
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;
}