Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:36611 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933AbbGaAmh (ORCPT ); Thu, 30 Jul 2015 20:42:37 -0400 Subject: Patch "ACPI / resources: free memory on error in add_region_before()" has been added to the 4.1-stable tree To: dan.carpenter@oracle.com, gregkh@linuxfoundation.org, rafael.j.wysocki@intel.com Cc: , From: Date: Thu, 30 Jul 2015 17:42:34 -0700 Message-ID: <143830335465103@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 ACPI / resources: free memory on error in add_region_before() to the 4.1-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: acpi-resources-free-memory-on-error-in-add_region_before.patch and it can be found in the queue-4.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From 7bc10388ccdd79b3d20463151a1f8e7a590a775b Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 24 Jun 2015 17:30:15 +0300 Subject: ACPI / resources: free memory on error in add_region_before() From: Dan Carpenter commit 7bc10388ccdd79b3d20463151a1f8e7a590a775b upstream. There is a small memory leak on error. Fixes: 0f1b414d1907 (ACPI / PNP: Avoid conflicting resource reservations) Signed-off-by: Dan Carpenter Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/resource.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -660,8 +660,10 @@ static int add_region_before(u64 start, return -ENOMEM; error = request_range(start, end, space_id, flags, desc); - if (error) + if (error) { + kfree(reg); return error; + } reg->start = start; reg->end = end; Patches currently in stable-queue which might be from dan.carpenter@oracle.com are queue-4.1/acpi-lpss-fix-up-acpi_lpss_create_device.patch queue-4.1/ima-cleanup-ima_init_policy-a-little.patch queue-4.1/usb-devio-fix-a-condition-in-async_completed.patch queue-4.1/acpi-resources-free-memory-on-error-in-add_region_before.patch queue-4.1/asoc-imx-wm8962-add-a-missing-error-check.patch queue-4.1/ath9k_htc-memory-corruption-calling-set_bit.patch