]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vhost-user-gpu: do not send scanout update if no GPU socket
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 5 Jun 2019 14:58:25 +0000 (16:58 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 16 Jun 2019 20:16:52 +0000 (16:16 -0400)
Should fix coverity CID 1401760.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20190605145829.7674-2-marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
contrib/vhost-user-gpu/main.c

index f9e2146b69c48e871f842a6fa74fedca2fa09cec..9614c9422c9f65cbdea9643eb52c52578b356b10 100644 (file)
@@ -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),