[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAMf7+Lj-CcjD2+m9519JMgO2O0EA39qAY+FDv_4OnoshTs=Ciw@mail.gmail.com>
Date: Mon, 4 Jan 2016 11:46:06 +0530
From: pavi1729 <pavitra1729@...il.com>
To: netdev@...r.kernel.org
Subject: Fwd: [PATCH stable-3.14] usb: gadget: f_ncm: fix skb_clone memleak on error
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@...il.com>
---
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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists