[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/6] virtio-gpu: fix memory leak in set scanout
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 1/6] virtio-gpu: fix memory leak in set scanout |
Date: |
Mon, 13 Feb 2017 09:17:26 +0100 |
From: Li Qiang <address@hidden>
In virtio_gpu_set_scanout function, when creating the 'rect'
its refcount is set to 2, by pixman_image_create_bits and
qemu_create_displaysurface_pixman function. This can lead
a memory leak issues. This patch avoid this issue.
Signed-off-by: Li Qiang <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <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 444ca06..9b530ab 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -608,6 +608,7 @@ static void virtio_gpu_set_scanout(VirtIOGPU *g,
cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
return;
}
+ pixman_image_unref(rect);
dpy_gfx_replace_surface(g->scanout[ss.scanout_id].con, scanout->ds);
}
--
1.8.3.1
- [Qemu-devel] [PULL 0/6] vga patch queue, Gerd Hoffmann, 2017/02/13
- [Qemu-devel] [PULL 5/6] cirrus: fix patterncopy checks, Gerd Hoffmann, 2017/02/13
- [Qemu-devel] [PULL 1/6] virtio-gpu: fix memory leak in set scanout,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 3/6] vga: replace debug printf with trace points, Gerd Hoffmann, 2017/02/13
- [Qemu-devel] [PULL 2/6] virtio-gpu: fix resource leak in virgl_cmd_resource_unref, Gerd Hoffmann, 2017/02/13
- [Qemu-devel] [PULL 6/6] Revert "cirrus: allow zero source pitch in pattern fill rops", Gerd Hoffmann, 2017/02/13
- [Qemu-devel] [PULL 4/6] cirrus: replace debug printf with trace points, Gerd Hoffmann, 2017/02/13
- Re: [Qemu-devel] [PULL 0/6] vga patch queue, Peter Maydell, 2017/02/13