Skip to content

Commit 04562ee

Browse files
committed
virtio-gpu/win32: set the destroy function on load
Don't forget to unmap the resource memory. Fixes: commit 9462ff4 ("virtio-gpu/win32: allocate shareable 2d resources/images") Signed-off-by: Marc-André Lureau <[email protected]>
1 parent 6d8cd7c commit 04562ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hw/display/virtio-gpu.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,9 @@ static int virtio_gpu_load(QEMUFile *f, void *opaque, size_t size,
12831283
g_free(res);
12841284
return -EINVAL;
12851285
}
1286-
1286+
#ifdef WIN32
1287+
pixman_image_set_destroy_function(res->image, win32_pixman_image_destroy, res->handle);
1288+
#endif
12871289

12881290
res->addrs = g_new(uint64_t, res->iov_cnt);
12891291
res->iov = g_new(struct iovec, res->iov_cnt);

0 commit comments

Comments
 (0)