|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-xen master] virtio-gpu: fix memory leak in update_cursor_data_virgl
commit 2d1cd6c7a91a4beb99a0c3a21be529222a708545
Author: Li Qiang <liqiang6-s@xxxxxx>
AuthorDate: Tue Nov 1 04:06:58 2016 -0700
Commit: Gerd Hoffmann <kraxel@xxxxxxxxxx>
CommitDate: Mon Dec 5 09:37:52 2016 +0100
virtio-gpu: fix memory leak in update_cursor_data_virgl
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@xxxxxx>
Message-id: 58187760.41d71c0a.cca75.4cb9@xxxxxxxxxxxxx
Reviewed-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
---
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;
}
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master
_______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |