aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2017-06-06 17:22:53 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2017-06-08 11:05:31 +1000
commit2d3e302ec2246d703ffa8d8f8769a3fa448d8145 (patch)
treec769baf856ac5a0683f389a29cc972537230e8a5
parentec69355beffe138c0f97306e65410e5dbc605554 (diff)
downloadqemu-2d3e302ec2246d703ffa8d8f8769a3fa448d8145.zip
qemu-2d3e302ec2246d703ffa8d8f8769a3fa448d8145.tar.gz
qemu-2d3e302ec2246d703ffa8d8f8769a3fa448d8145.tar.bz2
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 <groug@kaod.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--target/ppc/kvm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 8881762..f2f7c53 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();
}