diff options
author | Vasily Averin <vvs@sw.ru> | 2006-04-27 11:25:00 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-05-14 05:38:24 +0200 |
commit | 64385f2fd8bc9d8803c8d10dcd391871cb126b77 (patch) | |
tree | bc18ddbf256b959a10386cee2d9cf44c208eec03 /drivers/acpi/utils.c | |
parent | ACPI: silence ia64 build warning (diff) | |
download | linux-64385f2fd8bc9d8803c8d10dcd391871cb126b77.tar.xz linux-64385f2fd8bc9d8803c8d10dcd391871cb126b77.zip |
ACPI: fix potential memory leak in acpi_evaluate_integer() error path
Signed-off-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utils.c')
-rw-r--r-- | drivers/acpi/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index 6458c47f7ac2..6b516852ac12 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -273,11 +273,13 @@ acpi_evaluate_integer(acpi_handle handle, status = acpi_evaluate_object(handle, pathname, arguments, &buffer); if (ACPI_FAILURE(status)) { acpi_util_eval_error(handle, pathname, status); + kfree(element); return_ACPI_STATUS(status); } if (element->type != ACPI_TYPE_INTEGER) { acpi_util_eval_error(handle, pathname, AE_BAD_DATA); + kfree(element); return_ACPI_STATUS(AE_BAD_DATA); } |