1 From 74a46afa58632277063ca4990cf0c954f342dd7d Mon Sep 17 00:00:00 2001
2 From: Li Qiang <liqiang6-s@360.cn>
3 Date: Tue, 1 Nov 2016 04:06:58 -0700
4 Subject: [PATCH 03/12] virtio-gpu: fix memory leak in update_cursor_data_virgl
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 In update_cursor_data_virgl function, if the 'width'/ 'height'
10 is not equal to current cursor's width/height it will return
11 without free the 'data' allocated previously. This will lead
12 a memory leak issue. This patch fix this issue.
14 Signed-off-by: Li Qiang <liqiang6-s@360.cn>
15 Message-id: 58187760.41d71c0a.cca75.4cb9@mx.google.com
16 Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
17 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
19 hw/display/virtio-gpu.c | 1 +
20 1 file changed, 1 insertion(+)
22 diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
23 index 5b6d17b..41f8096 100644
24 --- a/hw/display/virtio-gpu.c
25 +++ b/hw/display/virtio-gpu.c
26 @@ -84,6 +84,7 @@ static void update_cursor_data_virgl(VirtIOGPU *g,
28 if (width != s->current_cursor->width ||
29 height != s->current_cursor->height) {