All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@sw.ru>
To: Len Brown <len.brown@intel.com>,
	linux-acpi@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Kirill Korotaev <dev@sw.ru>,
	devel@openvz.org
Subject: [PATCH ACPI] memory leak in acpi_evaluate_integer()
Date: Sun, 09 Apr 2006 19:07:51 +0400	[thread overview]
Message-ID: <44392347.406@sw.ru> (raw)

[-- 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);
 	}
 

                 reply	other threads:[~2006-04-09 15:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=44392347.406@sw.ru \
    --to=vvs@sw.ru \
    --cc=akpm@osdl.org \
    --cc=dev@sw.ru \
    --cc=devel@openvz.org \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.