|
| From: | Thomas Huth |
| Subject: | Re: [Qemu-ppc] [PATCH 2/3] target/ppc: fix memory leak in kvmppc_is_mem_backend_page_size_ok() |
| Date: | Tue, 6 Jun 2017 17:41:15 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 06.06.2017 17:22, Greg Kurz wrote:
> The string returned by object_property_get_str() is dynamically allocated.
>
> Signed-off-by: Greg Kurz <address@hidden>
> ---
> target/ppc/kvm.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
> index 88817620766c..f2f7c531bc7b 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();
> }
>
Reviewed-by: Thomas Huth <address@hidden>
| [Prev in Thread] | Current Thread | [Next in Thread] |