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

Sergei Shtylyov
2019-04-10T09:18:00Z

On 09.04.2019 14:43, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
>
> 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@canonical.com>
[...]

MBR, Sergei