qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-gpu: fix memory leak in update_cursor_da


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH] virtio-gpu: fix memory leak in update_cursor_data_virgl
Date: Tue, 01 Nov 2016 11:17:04 +0000

Hi

On Tue, Nov 1, 2016 at 2:07 PM Li Qiang <address@hidden> wrote:

> From: Li Qiang <address@hidden>
>
> In update_cursor_data_virgl function, if the 'width'/ 'height'
> is not equal to current cursor's width/height it will return
> without free the 'data' allocated previously. This will lead
> a memory leak issue. This patch fix this issue.
>
> Signed-off-by: Li Qiang <address@hidden>
>


Reviewed-by: Marc-André Lureau <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 60bce94..5f32e1a 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -84,6 +84,7 @@ static void update_cursor_data_virgl(VirtIOGPU *g,
>
>      if (width != s->current_cursor->width ||
>          height != s->current_cursor->height) {
> +        free(data);
>          return;
>      }
>
> --
> 1.8.3.1
>
>
> --
Marc-André Lureau


reply via email to

[Prev in Thread] Current Thread [Next in Thread]