diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-06-24 20:52:54 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-06-24 20:52:54 +0300 |
commit | 11f68686065a5634b09b374e988eb82c83a34d24 (patch) | |
tree | 7e900eafc70f58a0234a3079059a015f2b3d3733 /drivers/acpi | |
parent | 43c9fad942b5afb9e03801c0721d83160fa5b0dd (diff) | |
parent | 7bc10388ccdd79b3d20463151a1f8e7a590a775b (diff) | |
download | linux-11f68686065a5634b09b374e988eb82c83a34d24.tar.xz |
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; |