From: Geyslan G. Bem Date: Fri, 15 Nov 2013 12:21:47 +0000 (-0300) Subject: brcmfmac: fix possible memory leak X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3b1bace9960b0acbcb5d0ca194077f03df7cc2c0;p=linux-beck.git brcmfmac: fix possible memory leak Free temporary 'chanspecs' avoiding leakage. Signed-off-by: Geyslan G. Bem Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c index d7a974532909..fcc5e7cfb492 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)