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 <stable@xxxxxxxxxxxxxxx> know about it. >From 7bc10388ccdd79b3d20463151a1f8e7a590a775b Mon Sep 17 00:00:00 2001 From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Date: Wed, 24 Jun 2015 17:30:15 +0300 Subject: ACPI / resources: free memory on error in add_region_before() From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> commit 7bc10388ccdd79b3d20463151a1f8e7a590a775b upstream. There is a small memory leak on error. Fixes: 0f1b414d1907 (ACPI / PNP: Avoid conflicting resource reservations) Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 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@xxxxxxxxxx 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 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html