From: Marc-André Lureau Date: Wed, 5 Jun 2019 14:58:25 +0000 (+0200) Subject: vhost-user-gpu: do not send scanout update if no GPU socket X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1e40d19877031120631295348c26f43bea08afed;p=qemu.git vhost-user-gpu: do not send scanout update if no GPU socket Should fix coverity CID 1401760. Signed-off-by: Marc-André Lureau Message-Id: <20190605145829.7674-2-marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/contrib/vhost-user-gpu/main.c b/contrib/vhost-user-gpu/main.c index f9e2146b69..9614c9422c 100644 --- a/contrib/vhost-user-gpu/main.c +++ b/contrib/vhost-user-gpu/main.c @@ -354,7 +354,7 @@ vg_disable_scanout(VuGpu *g, int scanout_id) scanout->width = 0; scanout->height = 0; - { + if (g->sock_fd >= 0) { VhostUserGpuMsg msg = { .request = VHOST_USER_GPU_SCANOUT, .size = sizeof(VhostUserGpuScanout),