Subject: Re: [wireless-next] qtnfmac: check band before allocating cmd_skb to avoid resource leak

From: Kalle Valo <[email-masked]>
Date: Tue, 13 Jun 2017 07:02:13 +0000 (UTC)

Colin Ian King <[email-masked]> wrote:

> From: Colin Ian King <[email-masked]>
> 
> The current code allocates cmd_skb and then will leak this if band->band
> is an illegal value. It is simpler to sanity check the band first before
> allocating cmd_skb so that we don't have to free cmd_skb if an invalid
> band occurs.
> 
> Detected by CoverityScan, CID#1437561 ("Resource Leak")
> 
> Signed-off-by: Colin Ian King <[email-masked]>
> Reviewed-by: Igor Mitsyanko <[email-masked]>

Patch applied to wireless-drivers-next.git, thanks.

bc0384eedb66 qtnfmac: check band before allocating cmd_skb to avoid resource leak

-- 
https://patchwork.kernel.org/patch/9762863/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches