aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorVasily Averin <vvs@sw.ru>2006-04-27 05:25:00 -0400
committerLen Brown <len.brown@intel.com>2006-05-13 23:38:24 -0400
commit64385f2fd8bc9d8803c8d10dcd391871cb126b77 (patch)
treebc18ddbf256b959a10386cee2d9cf44c208eec03 /drivers/acpi
parent5810452d00ae5fed7f720185d02d79ec9d15b91e (diff)
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')
-rw-r--r--drivers/acpi/utils.c2
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,
273 status = acpi_evaluate_object(handle, pathname, arguments, &buffer); 273 status = acpi_evaluate_object(handle, pathname, arguments, &buffer);
274 if (ACPI_FAILURE(status)) { 274 if (ACPI_FAILURE(status)) {
275 acpi_util_eval_error(handle, pathname, status); 275 acpi_util_eval_error(handle, pathname, status);
276 kfree(element);
276 return_ACPI_STATUS(status); 277 return_ACPI_STATUS(status);
277 } 278 }
278 279
279 if (element->type != ACPI_TYPE_INTEGER) { 280 if (element->type != ACPI_TYPE_INTEGER) {
280 acpi_util_eval_error(handle, pathname, AE_BAD_DATA); 281 acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
282 kfree(element);
281 return_ACPI_STATUS(AE_BAD_DATA); 283 return_ACPI_STATUS(AE_BAD_DATA);
282 } 284 }
283 285