mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-23 02:54:32 +08:00
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>
This commit is contained in:
parent
5adcb81037
commit
aef0ba54ec
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user