diff options
author | Colin Ian King <colin.king@canonical.com> | 2016-02-19 14:16:34 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-02-24 14:14:48 +0100 |
commit | c340e5f0f8fe12079219ddf3c012bbc989b6f45b (patch) | |
tree | b0ebbf4c0e823ce220dfdeafe08a6dcc8581d949 /drivers/acpi | |
parent | 50db3052dac6e5ff7a8eeaaea138a6aaab6e608e (diff) | |
download | linux-stable-c340e5f0f8fe12079219ddf3c012bbc989b6f45b.tar.gz linux-stable-c340e5f0f8fe12079219ddf3c012bbc989b6f45b.tar.bz2 linux-stable-c340e5f0f8fe12079219ddf3c012bbc989b6f45b.zip |
ACPICA: debugger: dbconvert: free pld_info on error return path
ACPICA commit 23e644670539e23818fa81e2af5e89ad6657e75c
A failed allocation of new_buffer causes a leak of pld_info
because the error return path fails to free pld_info. Ensure
it is freed on the error exit path.
Link: https://github.com/acpica/acpica/commit/23e64467
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/dbconvert.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/dbconvert.c b/drivers/acpi/acpica/dbconvert.c index 9fee88f1c654..68f4e0f4b095 100644 --- a/drivers/acpi/acpica/dbconvert.c +++ b/drivers/acpi/acpica/dbconvert.c @@ -408,7 +408,7 @@ void acpi_db_dump_pld_buffer(union acpi_object *obj_desc) new_buffer = acpi_db_encode_pld_buffer(pld_info); if (!new_buffer) { - return; + goto exit; } /* The two bit-packed buffers should match */ @@ -479,6 +479,7 @@ void acpi_db_dump_pld_buffer(union acpi_object *obj_desc) pld_info->horizontal_offset); } - ACPI_FREE(pld_info); ACPI_FREE(new_buffer); +exit: + ACPI_FREE(pld_info); } |