stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [git:media_tree/master] [media] mceusb: fix memory leaks in error path
@ 2017-06-07 12:39 Mauro Carvalho Chehab
  0 siblings, 0 replies; only message in thread
From: Mauro Carvalho Chehab @ 2017-06-07 12:39 UTC (permalink / raw)
  To: linuxtv-commits; +Cc: stable, Jarod Wilson, Johan Hovold, Sean Young

This is an automatic generated email to let you know that the following patch were queued:

Subject: [media] mceusb: fix memory leaks in error path
Author:  Johan Hovold <johan@kernel.org>
Date:    Thu Jun 1 04:45:59 2017 -0300

Fix urb and transfer-buffer leaks in an urb-submission error path which
may be hit when a device is disconnected.

Fixes: 66e89522aff7 ("V4L/DVB: IR: add mceusb IR receiver driver")

Cc: stable <stable@vger.kernel.org>     # 2.6.36
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

 drivers/media/rc/mceusb.c | 2 ++
 1 file changed, 2 insertions(+)

---

diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index 4530237cbb67..04d6cd1818fb 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -795,6 +795,8 @@ static void mce_request_packet(struct mceusb_dev *ir, unsigned char *data,
 	res = usb_submit_urb(async_urb, GFP_ATOMIC);
 	if (res) {
 		dev_err(dev, "send request FAILED! (res=%d)", res);
+		kfree(async_buf);
+		usb_free_urb(async_urb);
 		return;
 	}
 	dev_dbg(dev, "send request complete (res=%d)", res);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-07 12:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-07 12:39 [git:media_tree/master] [media] mceusb: fix memory leaks in error path Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).