From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
<linux-kernel@vger.kernel.org>,
linux-acpi@vger.kernel.org,
Colin Ian King <colin.king@canonical.com>,
Bob Moore <robert.moore@intel.com>
Subject: [PATCH 05/15] ACPICA: debugger: dbconvert: free pld_info on error return path
Date: Fri, 19 Feb 2016 14:16:34 +0800 [thread overview]
Message-ID: <3b8dcecd0f2b96bb037e6e433bf60a2e887e6f91.1455857580.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1455857575.git.lv.zheng@intel.com>
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/acpi/acpica/dbconvert.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpica/dbconvert.c b/drivers/acpi/acpica/dbconvert.c
index 9fee88f..68f4e0f4 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);
}
--
1.7.10
next prev parent reply other threads:[~2016-02-19 6:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 6:15 [PATCH 00/15] ACPICA: 20160212 Release Lv Zheng
2016-02-19 6:16 ` [PATCH 01/15] ACPICA: aclocal: Put parens around some definitions Lv Zheng
2016-02-19 6:16 ` [PATCH 02/15] ACPICA: Remove incorrect "static" from a global structure Lv Zheng
2016-02-19 6:16 ` [PATCH 03/15] ACPICA: iASL: Fix some typos with the name strtoul64 Lv Zheng
2016-02-19 6:16 ` [PATCH 04/15] ACPICA: iASL: Update to use internal acpi_ut_strtoul64 function Lv Zheng
2016-02-19 6:16 ` Lv Zheng [this message]
2016-02-19 6:16 ` [PATCH 06/15] ACPICA: Remove unnecessary arguments to ACPI_INFO Lv Zheng
2016-02-19 6:16 ` [PATCH 07/15] ACPICA: ACPI 6.0/iASL: Add support for the External AML opcode Lv Zheng
2016-02-19 6:16 ` [PATCH 08/15] ACPICA: Tables: make default region accessible during the table load Lv Zheng
2016-02-19 6:17 ` [PATCH 09/15] ACPICA: ACPICA: Tune _REG evaluations order in the initialization steps Lv Zheng
2016-02-19 6:17 ` [PATCH 10/15] ACPICA: Namespace: Ensure \_SB._INI executed before any _REG Lv Zheng
2016-02-19 6:17 ` [PATCH 11/15] ACPICA: Namespace: Rename acpi_gbl_reg_methods_enabled to acpi_gbl_namespace_initialized Lv Zheng
2016-02-19 6:17 ` [PATCH 12/15] ACPICA: ACPI 6.1: Add full support for this version of ACPI spec Lv Zheng
2016-02-20 21:41 ` Abdulhamid, Harb
2016-02-24 16:22 ` Moore, Robert
2016-02-24 17:02 ` Moore, Robert
2016-02-24 17:39 ` Moore, Robert
2016-02-24 23:18 ` Rafael J. Wysocki
2016-02-19 6:17 ` [PATCH 13/15] ACPICA: Revert "Parser: Fix for SuperName method invocation" Lv Zheng
2016-02-19 6:17 ` [PATCH 14/15] ACPICA: Utilities: Update trace mechinism for acquire_object Lv Zheng
2016-02-19 6:17 ` [PATCH 15/15] ACPICA: Update version to 20160212 Lv Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3b8dcecd0f2b96bb037e6e433bf60a2e887e6f91.1455857580.git.lv.zheng@intel.com \
--to=lv.zheng@intel.com \
--cc=colin.king@canonical.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=robert.moore@intel.com \
--cc=zetalog@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®