RE: [EXT] Re: [PATCH] mwifiex: check for null return from skb_copy

2019-06-01 Thread Ganapathi Bhat
Hi Dan, > > > > if (is_multicast_ether_addr(ra)) { > > > > skb_uap = skb_copy(skb, GFP_ATOMIC); > > > > + if (!skb_uap) > > > > + return -ENOMEM; > > > > > > I think we would want to free dev_kfree_skb_any(skb) before returning. > > I thi

Re: [EXT] Re: [PATCH] mwifiex: check for null return from skb_copy

2019-06-01 Thread Dan Carpenter
On Sat, Jun 01, 2019 at 05:29:26PM +, Ganapathi Bhat wrote: > Hi Dan, > > > > if (is_multicast_ether_addr(ra)) { > > > skb_uap = skb_copy(skb, GFP_ATOMIC); > > > + if (!skb_uap) > > > + return -ENOMEM; > > > > I think we would want to free dev_kfree_skb_any

RE: [EXT] Re: [PATCH] mwifiex: check for null return from skb_copy

2019-06-01 Thread Ganapathi Bhat
Hi Dan, > > if (is_multicast_ether_addr(ra)) { > > skb_uap = skb_copy(skb, GFP_ATOMIC); > > + if (!skb_uap) > > + return -ENOMEM; > > I think we would want to free dev_kfree_skb_any(skb) before returning. I think if the pointer is NULL, no need to free