On Wed, 2018-01-31 at 15:33 -0600, Denis Kenzior wrote:
> 
> +             if (!cfg80211_rx_control_port(dev, skb->data, skb->len,
> +                                           ehdr->h_source,
> +                                           be16_to_cpu(skb->protocol),
> +                                           noencrypt))
> +                     dev_kfree_skb(skb);

Err, you should free it unconditionally, no? You don't do anything with
the skb afterwards, since you can't get into the else branch and
deliver it to the netdev now, so afaict it'd be leaked if not freed?

Which explains why you didn't notice the error in the previous patch,
it was making this code correct by freeing it all the time (never
hitting an error, presumably, and even if you wouldn't notice the small
leaks)

johannes

Reply via email to