[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH for-2.9 stable] target/ppc: fix memory leak in kvmppc_
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH for-2.9 stable] target/ppc: fix memory leak in kvmppc_is_mem_backend_page_size_ok() |
Date: |
Wed, 21 Jun 2017 17:34:44 +0800 |
From: Greg Kurz <address@hidden>
The string returned by object_property_get_str() is dynamically allocated.
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
(cherry picked from commit 2d3e302ec2246d703ffa8d8f8769a3fa448d8145)
---
target/ppc/kvm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 9f1f132..e7f7b29 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -423,6 +423,7 @@ bool kvmppc_is_mem_backend_page_size_ok(char *obj_path)
if (mempath) {
pagesize = qemu_mempath_getpagesize(mempath);
+ g_free(mempath);
} else {
pagesize = getpagesize();
}
--
2.9.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-ppc] [PATCH for-2.9 stable] target/ppc: fix memory leak in kvmppc_is_mem_backend_page_size_ok(),
David Gibson <=