Fixed skb_clone pointer memleak on error path. Since the newly cloned skb is still not added to the list, hence purge list wont free the cloned skb. stable-3.14.y: 5d7b0fcc26 Signed-off-by: Pavitrakumar Managutte <pavitra1729@xxxxxxxxx> --- drivers/usb/gadget/f_ncm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/f_ncm.c b/drivers/usb/gadget/f_ncm.c index a9499fd..6227fa2 100644 --- a/drivers/usb/gadget/f_ncm.c +++ b/drivers/usb/gadget/f_ncm.c @@ -1066,6 +1066,8 @@ static int ncm_unwrap_ntb(struct gether *port, } if (!skb_pull(skb2, index)) { + if(skb2 != skb) + dev_kfree_skb_any(skb2); ret = -EOVERFLOW; goto err; } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html