[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] virtio-gpu: call cleanup mapping function i
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] virtio-gpu: call cleanup mapping function in resource destroy |
Date: |
Mon, 28 Nov 2016 12:44:26 +0000 |
Hi
On Thu, Nov 24, 2016 at 4:30 PM Li Qiang <address@hidden> wrote:
> If the guest destroy the resource before detach banking, the 'iov'
> and 'addrs' field in resource is not freed thus leading memory
> leak issue. This patch avoid this.
>
>
That looks correct to me.
Reviewed-by: Marc-André Lureau <address@hidden>
Please squash patch 1 (no reason for it to be split).
> Signed-off-by: Li Qiang <address@hidden>
> ---
> hw/display/virtio-gpu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> index cc725a6..98dadf2 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -360,6 +360,7 @@ static void virtio_gpu_resource_destroy(VirtIOGPU *g,
> struct virtio_gpu_simple_resource
> *res)
> {
> pixman_image_unref(res->image);
> + virtio_gpu_cleanup_mapping(res);
> QTAILQ_REMOVE(&g->reslist, res, next);
> g_free(res);
> }
> --
> 1.8.3.1
>
> --
Marc-André Lureau