From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:42672 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759394AbdAILOt (ORCPT ); Mon, 9 Jan 2017 06:14:49 -0500 Subject: Patch "[media] dibusb: fix possible memory leak in dibusb_rc_query()" has been added to the 4.9-stable tree To: weiyongjun1@huawei.com, gregkh@linuxfoundation.org, mchehab@s-opensource.com Cc: , From: Date: Mon, 09 Jan 2017 12:14:54 +0100 Message-ID: <148396049415383@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: This is a note to let you know that I've just added the patch titled [media] dibusb: fix possible memory leak in dibusb_rc_query() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: dibusb-fix-possible-memory-leak-in-dibusb_rc_query.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 1f5ecaf985c46889278f51fcb7bc143f60f4eb14 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Sat, 29 Oct 2016 23:36:24 -0200 Subject: [media] dibusb: fix possible memory leak in dibusb_rc_query() From: Wei Yongjun commit 1f5ecaf985c46889278f51fcb7bc143f60f4eb14 upstream. 'buf' is malloced in dibusb_rc_query() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff1c123545d7 ("[media] dibusb: handle error code on RC query") Signed-off-by: Wei Yongjun Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/dvb-usb/dibusb-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/usb/dvb-usb/dibusb-common.c +++ b/drivers/media/usb/dvb-usb/dibusb-common.c @@ -382,9 +382,9 @@ int dibusb_rc_query(struct dvb_usb_devic if (buf[0] != 0) deb_info("key: %*ph\n", 5, buf); +ret: kfree(buf); -ret: return ret; } EXPORT_SYMBOL(dibusb_rc_query); Patches currently in stable-queue which might be from weiyongjun1@huawei.com are queue-4.9/dibusb-fix-possible-memory-leak-in-dibusb_rc_query.patch