Commit 2d3e302e authored by Greg Kurz's avatar Greg Kurz Committed by David Gibson

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: 's avatarGreg Kurz <groug@kaod.org>
Reviewed-by: 's avatarThomas Huth <thuth@redhat.com>
Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
parent ec69355b
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment