On Fri, Mar 14, 2014 at 10:53:33AM +0100, Alexander Aring wrote:
> OOps, this was a little bit too fast, it should look like:
> 
> diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c
> index 2a146fb..9f96c77 100644
> --- a/net/ieee802154/6lowpan_rtnl.c
> +++ b/net/ieee802154/6lowpan_rtnl.c
> @@ -189,7 +189,6 @@ static int process_data(struct sk_buff *skb)
>                                 lowpan_give_skb_to_devices);
>  
>  drop:
> -       kfree_skb(skb);
>         return -EINVAL;
>  }
>  
> @@ -432,7 +431,7 @@ static int lowpan_validate(struct nlattr *tb[], struct 
> nlattr *data[])
>  static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
>         struct packet_type *pt, struct net_device *orig_dev)
>  {
> -       struct sk_buff *local_skb;
> +       struct sk_buff *local_skb = NULL;
>         int ret;
>         bool fail;
>  
> @@ -493,6 +492,8 @@ static int lowpan_rcv(struct sk_buff *skb, struct 
> net_device *dev,
>  drop_skb:
>         kfree_skb(skb);
>  drop:
> +       if (local_skb)
> +               kfree_skb(local_skb);

and this is null proofed so we can remove the if condition... Sry.

- Alex

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to