From: David Woodhouse Date: Thu, 8 Jul 2021 19:35:52 +0000 (+0100) Subject: Tweak vhost ring handling to stop Coverity thinking we leak packets X-Git-Tag: v8.20~100 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=002e8364fc225cd290d88b770ada7995496b71bd;p=users%2Fdwmw2%2Fopenconnect.git Tweak vhost ring handling to stop Coverity thinking we leak packets Signed-off-by: David Woodhouse --- 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();