On Thu, Jul 31, 2014 at 07:54:27AM +0200, Alexander Aring wrote:
...
> >  
> >     raw_dump_inline(NULL,
> > @@ -179,10 +179,10 @@ static int skb_deliver(struct sk_buff *skb, struct 
> > ipv6hdr *hdr,
> >  
> >     new = skb_copy_expand(skb, sizeof(struct ipv6hdr),
> >                           skb_tailroom(skb), GFP_ATOMIC);
> > -   kfree_skb(skb);
> > -
> >     if (!new)
> > -           return -ENOMEM;
> > +           return -1;
> > +
> > +   kfree_skb(skb);
> 
> This leaks memory here, move kfree_skb above the condition after the
> skb_copy_expand. This should be also a consume_skb or dev_kfree_skb, we
> should not mix these function in this file and use only one of them.
> 
> We need another patch for this.
>

Ah, no there is no memory leaking sorry. You removed also the
kfree_skb(skb) in the drop label and we do this at one place to detect if
an error occur.

Maybe we can return the errno at the drop label and set err = -ENOMEM
and do a goto drop.

- Alex


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to