diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-09-06 16:37:43 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-09-12 10:37:02 +0400 |
commit | 04562ee88e99d71f4e6017f64123f726dd8b41e1 (patch) | |
tree | b7389179d6c9bd999d7017e174be9cbf1ae7fda9 /hw | |
parent | 6d8cd7c2205867d70d7520c890ad19a27651bdb2 (diff) | |
download | qemu-04562ee88e99d71f4e6017f64123f726dd8b41e1.zip qemu-04562ee88e99d71f4e6017f64123f726dd8b41e1.tar.gz qemu-04562ee88e99d71f4e6017f64123f726dd8b41e1.tar.bz2 |
virtio-gpu/win32: set the destroy function on load
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/virtio-gpu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index bbd5c65..93857ad 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); |