From: Gerd Hoffmann <kraxel@redhat.com>
To: Li Qiang <liq3ea@gmail.com>
Cc: qemu-devel@nongnu.org, Li Qiang <liqiang6-s@360.cn>
Subject: Re: [Qemu-devel] [PATCH] virtio-gpu: fix memory leak in update_cursor_data_virgl
Date: Tue, 01 Nov 2016 12:16:22 +0100 [thread overview]
Message-ID: <1477998982.26731.32.camel@redhat.com> (raw)
In-Reply-To: <58187760.41d71c0a.cca75.4cb9@mx.google.com>
On Di, 2016-11-01 at 04:06 -0700, Li Qiang wrote:
> From: Li Qiang <liqiang6-s@360.cn>
>
> 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 <liqiang6-s@360.cn>
> ---
> 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;
> }
>
Added to vga patch queue.
thanks,
Gerd
next prev parent reply other threads:[~2016-11-01 11:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 11:06 [Qemu-devel] [PATCH] virtio-gpu: fix memory leak in update_cursor_data_virgl Li Qiang
2016-11-01 11:16 ` Gerd Hoffmann [this message]
2016-11-01 11:17 ` Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1477998982.26731.32.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=liq3ea@gmail.com \
--cc=liqiang6-s@360.cn \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.