[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/14] virtio-gpu/win32: set the destroy function on load
From: |
marcandre . lureau |
Subject: |
[PULL 12/14] virtio-gpu/win32: set the destroy function on load |
Date: |
Tue, 12 Sep 2023 14:46:46 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Don't forget to unmap the resource memory.
Fixes: commit 9462ff469 ("virtio-gpu/win32: allocate shareable 2d
resources/images")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
hw/display/virtio-gpu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index bbd5c6561a..93857ad523 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1283,7 +1283,9 @@ static int virtio_gpu_load(QEMUFile *f, void *opaque,
size_t size,
g_free(res);
return -EINVAL;
}
-
+#ifdef WIN32
+ pixman_image_set_destroy_function(res->image,
win32_pixman_image_destroy, res->handle);
+#endif
res->addrs = g_new(uint64_t, res->iov_cnt);
res->iov = g_new(struct iovec, res->iov_cnt);
--
2.41.0
- [PULL 02/14] contrib/vhost-user-gpu: add support for sending dmabuf modifiers, (continued)
- [PULL 02/14] contrib/vhost-user-gpu: add support for sending dmabuf modifiers, marcandre . lureau, 2023/09/12
- [PULL 03/14] vhost-user-gpu: support dmabuf modifiers, marcandre . lureau, 2023/09/12
- [PULL 04/14] vmmouse: replace DPRINTF with tracing, marcandre . lureau, 2023/09/12
- [PULL 05/14] vmmouse: use explicit code, marcandre . lureau, 2023/09/12
- [PULL 06/14] ui/vc: remove kbd_put_keysym() and update function calls, marcandre . lureau, 2023/09/12
- [PULL 07/14] ui/vc: rename kbd_put to qemu_text_console functions, marcandre . lureau, 2023/09/12
- [PULL 08/14] ui/console: remove redundant format field, marcandre . lureau, 2023/09/12
- [PULL 09/14] ui/vc: preliminary QemuTextConsole changes before split, marcandre . lureau, 2023/09/12
- [PULL 10/14] ui/vc: split off the VC part from console.c, marcandre . lureau, 2023/09/12
- [PULL 11/14] ui/console: move DisplaySurface to its own header, marcandre . lureau, 2023/09/12
- [PULL 12/14] virtio-gpu/win32: set the destroy function on load,
marcandre . lureau <=
- [PULL 13/14] ui: fix crash when there are no active_console, marcandre . lureau, 2023/09/12
- [PULL 14/14] ui: add precondition for dpy_get_ui_info(), marcandre . lureau, 2023/09/12