brcmfmac: Fix memory leak and missing assignment.
The function brcmf_enable_bw40_2g contains a memory leak. The function is also missing initialisation of one of the members of ch struct, which can lead to warning but this has no impact on result. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
ae0fd63541
commit
fac7d2a3b8
@@ -5143,6 +5143,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
|
|||||||
|
|
||||||
ch.band = BRCMU_CHAN_BAND_2G;
|
ch.band = BRCMU_CHAN_BAND_2G;
|
||||||
ch.bw = BRCMU_CHAN_BW_40;
|
ch.bw = BRCMU_CHAN_BW_40;
|
||||||
|
ch.sb = BRCMU_CHAN_SB_NONE;
|
||||||
ch.chnum = 0;
|
ch.chnum = 0;
|
||||||
cfg->d11inf.encchspec(&ch);
|
cfg->d11inf.encchspec(&ch);
|
||||||
|
|
||||||
@@ -5176,6 +5177,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
|
|||||||
|
|
||||||
brcmf_update_bw40_channel_flag(&band->channels[j], &ch);
|
brcmf_update_bw40_channel_flag(&band->channels[j], &ch);
|
||||||
}
|
}
|
||||||
|
kfree(pbuf);
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user