public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH ACPI] memory leak in acpi_evaluate_integer()
@ 2006-04-09 15:07 Vasily Averin
  0 siblings, 0 replies; only message in thread
From: Vasily Averin @ 2006-04-09 15:07 UTC (permalink / raw)
  To: Len Brown, linux-acpi, Linux Kernel Mailing List, Andrew Morton,
	Kirill Korotaev, devel

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]

acpi_evaluate_integer() does not release allocated memory on the error path.

Signed-off-by: Vasily Averin <vvs@sw.ru>

Thank you,
	Vasily Averin

SWsoft Virtuozzo/OpenVZ Linux kernel team

[-- Attachment #2: diff-ms-acpi-evint-20060409 --]
[-- Type: text/plain, Size: 558 bytes --]

--- a/drivers/acpi/utils.c	2006-04-09 14:31:39.000000000 +0400
+++ b/drivers/acpi/utils.c	2006-04-09 14:35:02.000000000 +0400
@@ -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);
 	}
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-09 15:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-09 15:07 [PATCH ACPI] memory leak in acpi_evaluate_integer() Vasily Averin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox