From 1e40d19877031120631295348c26f43bea08afed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 5 Jun 2019 16:58:25 +0200 Subject: [PATCH] vhost-user-gpu: do not send scanout update if no GPU socket MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- contrib/vhost-user-gpu/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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),