From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NflNg-0002di-FV for qemu-devel@nongnu.org; Thu, 11 Feb 2010 21:35:44 -0500 Received: from [199.232.76.173] (port=55499 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NflNg-0002da-6S for qemu-devel@nongnu.org; Thu, 11 Feb 2010 21:35:44 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NflNf-0004NS-CZ for qemu-devel@nongnu.org; Thu, 11 Feb 2010 21:35:44 -0500 Received: from mail.valinux.co.jp ([210.128.90.3]:57214) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NflNf-0004NO-0Y for qemu-devel@nongnu.org; Thu, 11 Feb 2010 21:35:43 -0500 Date: Fri, 12 Feb 2010 11:36:20 +0900 From: Isaku Yamahata Message-ID: <20100212023620.GD11930@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] seabios: acpi: fix memory leak in build_srat(). List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: seabios@seabios.org Cc: qemu-devel@nongnu.org numadata() is allocated for temporal use, but not freed. free it. Signed-off-by: Isaku Yamahata --- src/acpi.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/acpi.c b/src/acpi.c index dbdca79..e2a1153 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -490,6 +490,7 @@ build_srat(void) srat = malloc_high(srat_size); if (!srat) { dprintf(1, "Not enough memory for srat table!\n"); + free(numadata); return NULL; } @@ -556,6 +557,7 @@ build_srat(void) build_header((void*)srat, SRAT_SIGNATURE, srat_size, 1); + free(numadata); return srat; } -- 1.6.6.1