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

2017-06-02 Thread Igor Mitsyanko
On 06/02/2017 08:40 AM, Colin King wrote: External Email From: Colin Ian King 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

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

2017-06-02 Thread Colin King
From: Colin Ian King 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