From cbc561637750f61b2d80348a40e03da46c0ea6dd Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 14 Jan 2021 15:44:12 +0100 Subject: [PATCH] vrend: Don't try to copy to res->iov if there is none Signed-off-by: Gert Wollny Reviewed-by: Chia-I Wu --- src/vrend_renderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 5cf9f1f..b76c771 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -7303,8 +7303,8 @@ static int vrend_renderer_transfer_write_iov(struct vrend_context *ctx, { void *data; - if (is_only_bit(res->storage_bits, VREND_STORAGE_GUEST_MEMORY) || - (has_bit(res->storage_bits, VREND_STORAGE_HOST_SYSTEM_MEMORY) && res->iov)) { + if ((is_only_bit(res->storage_bits, VREND_STORAGE_GUEST_MEMORY) || + has_bit(res->storage_bits, VREND_STORAGE_HOST_SYSTEM_MEMORY)) && res->iov) { return vrend_copy_iovec(iov, num_iovs, info->offset, res->iov, res->num_iovs, info->box->x, info->box->width, res->ptr);