qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] seabios: acpi: fix memory leak in build_srat().
@ 2010-02-12  2:36 Isaku Yamahata
  2010-02-13 23:08 ` Kevin O'Connor
  0 siblings, 1 reply; 2+ messages in thread
From: Isaku Yamahata @ 2010-02-12  2:36 UTC (permalink / raw)
  To: seabios; +Cc: qemu-devel

numadata() is allocated for temporal use, but not freed.
free it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] seabios: acpi: fix memory leak in build_srat().
  2010-02-12  2:36 [Qemu-devel] [PATCH] seabios: acpi: fix memory leak in build_srat() Isaku Yamahata
@ 2010-02-13 23:08 ` Kevin O'Connor
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin O'Connor @ 2010-02-13 23:08 UTC (permalink / raw)
  To: Isaku Yamahata; +Cc: seabios, qemu-devel

On Fri, Feb 12, 2010 at 11:36:20AM +0900, Isaku Yamahata wrote:
> numadata() is allocated for temporal use, but not freed.
> free it.

Thanks.

-Kevin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-13 23:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-12  2:36 [Qemu-devel] [PATCH] seabios: acpi: fix memory leak in build_srat() Isaku Yamahata
2010-02-13 23:08 ` Kevin O'Connor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).