From 2d3e302ec2246d703ffa8d8f8769a3fa448d8145 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Tue, 6 Jun 2017 17:22:53 +0200 Subject: target/ppc: fix memory leak in kvmppc_is_mem_backend_page_size_ok() The string returned by object_property_get_str() is dynamically allocated. Signed-off-by: Greg Kurz Reviewed-by: Thomas Huth Signed-off-by: David Gibson --- target/ppc/kvm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'target') diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 8881762076..f2f7c531bc 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -486,6 +486,7 @@ bool kvmppc_is_mem_backend_page_size_ok(const char *obj_path) if (mempath) { pagesize = qemu_mempath_getpagesize(mempath); + g_free(mempath); } else { pagesize = getpagesize(); } -- cgit v1.2.3