mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
ec69355bef
commit
2d3e302ec2
|
@ -486,6 +486,7 @@ bool kvmppc_is_mem_backend_page_size_ok(const char *obj_path)
|
||||||
|
|
||||||
if (mempath) {
|
if (mempath) {
|
||||||
pagesize = qemu_mempath_getpagesize(mempath);
|
pagesize = qemu_mempath_getpagesize(mempath);
|
||||||
|
g_free(mempath);
|
||||||
} else {
|
} else {
|
||||||
pagesize = getpagesize();
|
pagesize = getpagesize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue