skb_clone related query

pavi1729 pavitra1729 at gmail.com
Mon Dec 28 09:16:11 EST 2015


Hi,
  Just out of curisity, I was looking at Kernel 3.14, skb_clone
function in f_ncm.c

http://lxr.free-electrons.com/source/drivers/usb/gadget/f_ncm.c?v=3.14#L1063


QUERY : Shouldn't a kfree_skb(skb2); happen before goto err @1070 ?
              Is this not a memleak ?


1068           if (!skb_pull(skb2, index)) {
1069                         ret = -EOVERFLOW;
1070                         goto err;
1071           }


Thanks,
Pavi



More information about the Kernelnewbies mailing list