From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:40363 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752342AbdGVOPw (ORCPT ); Sat, 22 Jul 2017 10:15:52 -0400 Subject: FAILED: patch "[PATCH] [media] mceusb: fix memory leaks in error path" failed to apply to 3.18-stable tree To: johan@kernel.org, jarod@redhat.com, mchehab@s-opensource.com, sean@mess.org, stable@vger.kernel.org Cc: From: Date: Sat, 22 Jul 2017 16:14:53 +0200 Message-ID: <15007328931603@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: The patch below does not apply to the 3.18-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >>From 2d5a6ce71c72d98d4f7948672842e3e8c265a8b7 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Thu, 1 Jun 2017 04:45:59 -0300 Subject: [PATCH] [media] mceusb: fix memory leaks in error path 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 # 2.6.36 Cc: Jarod Wilson Signed-off-by: Johan Hovold Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab 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);