qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 5/6] qom: Fix memory leak in function container_get


From: Stefan Weil
Subject: [Qemu-devel] [PATCH 5/6] qom: Fix memory leak in function container_get
Date: Thu, 3 May 2012 07:14:52 +0200

Valgrind reported this memory leak which occured very often.

Test scenario:

qemu-system-i386 (no arguments), only BIOS started, terminate with
monitor command (quit).

Signed-off-by: Stefan Weil <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
---
 qom/container.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qom/container.c b/qom/container.c
index c9940ab..4ca8b5c 100644
--- a/qom/container.c
+++ b/qom/container.c
@@ -43,6 +43,8 @@ Object *container_get(Object *root, const char *path)
         }
     }
 
+    g_strfreev(parts);
+
     return obj;
 }
 
-- 
1.7.9




reply via email to

[Prev in Thread] Current Thread [Next in Thread]