diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-06-24 19:52:54 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-06-24 19:52:54 +0200 |
commit | 11f68686065a5634b09b374e988eb82c83a34d24 (patch) | |
tree | 7e900eafc70f58a0234a3079059a015f2b3d3733 /drivers/acpi | |
parent | Merge tag 'pm+acpi-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
parent | ACPI / resources: free memory on error in add_region_before() (diff) | |
download | linux-11f68686065a5634b09b374e988eb82c83a34d24.tar.xz linux-11f68686065a5634b09b374e988eb82c83a34d24.zip |
Merge branch 'acpi-pnp'
* acpi-pnp:
ACPI / resources: free memory on error in add_region_before()
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/resource.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index fcb7807ea8b7..10561ce16ed1 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -660,8 +660,10 @@ static int add_region_before(u64 start, u64 end, u8 space_id, 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; |