From e1920bec2f86ba1b14e3fefa56d0482f5e77bf2e Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Fri, 12 Feb 2010 11:36:20 +0900 Subject: [PATCH] seabios: acpi: fix memory leak in build_srat(). numadata() is allocated for temporal use, but not freed. free it. Signed-off-by: Isaku Yamahata --- src/acpi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/acpi.c b/src/acpi.c index 244536a..651f3a2 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -528,6 +528,7 @@ build_srat(void) srat = malloc_high(srat_size); if (!srat) { dprintf(1, "Not enough memory for srat table!\n"); + free(numadata); return NULL; } @@ -594,6 +595,7 @@ build_srat(void) build_header((void*)srat, SRAT_SIGNATURE, srat_size, 1); + free(numadata); return srat; } -- 2.39.5