diff options
author | Lin Ming <ming.m.lin@intel.com> | 2009-12-11 01:36:47 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-12-15 17:29:34 -0500 |
commit | 583061c59ffea1ea14f6dca735ab0f99238a7a92 (patch) | |
tree | 4be6118d33ae59f543e2973a1aefdbfac19389b6 /drivers/acpi/acpica/nseval.c | |
parent | b00eb796f1b67c46036b5490e83b31741f1eebaf (diff) |
ACPICA: Fix possible memory leak for module-level code execution
An object can be leaked for each block of executed module-level
code if the interpreter slack mode is enabled. The change deletes
any implicitly returned object in this case.
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nseval.c')
-rw-r--r-- | drivers/acpi/acpica/nseval.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c index f771e978c403..65e0d1a260ea 100644 --- a/drivers/acpi/acpica/nseval.c +++ b/drivers/acpi/acpica/nseval.c | |||
@@ -415,6 +415,12 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, | |||
415 | ACPI_DEBUG_PRINT((ACPI_DB_INIT, "Executed module-level code at %p\n", | 415 | ACPI_DEBUG_PRINT((ACPI_DB_INIT, "Executed module-level code at %p\n", |
416 | method_obj->method.aml_start)); | 416 | method_obj->method.aml_start)); |
417 | 417 | ||
418 | /* Delete a possible implicit return value (in slack mode) */ | ||
419 | |||
420 | if (info->return_object) { | ||
421 | acpi_ut_remove_reference(info->return_object); | ||
422 | } | ||
423 | |||
418 | /* Detach the temporary method object */ | 424 | /* Detach the temporary method object */ |
419 | 425 | ||
420 | acpi_ns_detach_object(parent_node); | 426 | acpi_ns_detach_object(parent_node); |