From 002e8364fc225cd290d88b770ada7995496b71bd Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 8 Jul 2021 20:35:52 +0100 Subject: [PATCH] Tweak vhost ring handling to stop Coverity thinking we leak packets Signed-off-by: David Woodhouse --- vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vhost.c b/vhost.c index 6032bc2d..8b25cec3 100644 --- a/vhost.c +++ b/vhost.c @@ -457,7 +457,7 @@ static inline int process_ring(struct openconnect_info *vpninfo, int tx, uint64_ if (!tx) ring->desc[desc].flags = vio16(VRING_DESC_F_WRITE); - ring->desc[desc].addr = vio64((uint64_t)&this->virtio.h); + ring->desc[desc].addr = vio64((uint64_t)this + pkt_offset(virtio.h)); ring->desc[desc].len = vio32(this->len + sizeof(this->virtio.h)); barrier(); -- 2.50.1