2013-11-15 12:27:48

by Geyslan G. Bem

[permalink] [raw]
Subject: [PATCH v2] brcmfmac: fix possible memory leak

Free temporary 'chanspecs' avoiding leakage.

Signed-off-by: Geyslan G. Bem <[email protected]>
---
drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
index d7a9745..fcc5e7c 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
@@ -823,6 +823,7 @@ static s32 brcmf_p2p_run_escan(struct brcmf_cfg80211_info *cfg,
}
err = brcmf_p2p_escan(p2p, num_nodfs, chanspecs, search_state,
action, P2PAPI_BSSCFG_DEVICE);
+ kfree(chanspecs);
}
exit:
if (err)
--
1.8.4.2