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>
(cherry picked from commit
04562ee88e99d71f4e6017f64123f726dd8b41e1)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
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);