aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/kvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/ppc/kvm.c')
-rw-r--r--target/ppc/kvm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 51249ce79e..f2f7c531bc 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -478,7 +478,7 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu)
}
}
-bool kvmppc_is_mem_backend_page_size_ok(char *obj_path)
+bool kvmppc_is_mem_backend_page_size_ok(const char *obj_path)
{
Object *mem_obj = object_resolve_path(obj_path, NULL);
char *mempath = object_property_get_str(mem_obj, "mem-path", NULL);
@@ -486,6 +486,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();
}
@@ -499,7 +500,7 @@ static inline void kvm_fixup_page_sizes(PowerPCCPU *cpu)
{
}
-bool kvmppc_is_mem_backend_page_size_ok(char *obj_path)
+bool kvmppc_is_mem_backend_page_size_ok(const char *obj_path)
{
return true;
}