Re: [PATCH][V2] brcmfmac: fix leak of mypkt on error return path

From: Sergei Shtylyov
Date: Wed Apr 10 2019 - 05:18:01 EST


On 09.04.2019 14:43, Colin King wrote:

From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Currently if the call to brcmf_sdiod_set_backplane_window fails then
then error return path leaks mypkt. Fix this by returning by a new

One "then" is enough. :-)

error path labelled 'out' that calls brcmu_pkt_buf_free_skb to free
mypkt. Also remove redundant check on err before calling
brcmf_sdiod_skbuff_write.

Addresses-Coverity: ("Resource Leak")
Fixes: a7c3aa1509e2 ("brcmfmac: Remove brcmf_sdiod_addrprep()")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
[...]

MBR, Sergei