qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 2/3] qom: Fix memory leak in function container_get


From: Stefan Weil
Subject: [Qemu-devel] [PATCH 2/3] qom: Fix memory leak in function container_get
Date: Sat, 28 Apr 2012 14:20:19 +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>
---
 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]