summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lureau2019-06-05 16:58:25 +0200
committerMichael S. Tsirkin2019-06-16 22:16:52 +0200
commit1e40d19877031120631295348c26f43bea08afed (patch)
tree3547fd8d2c436dceed03af39027d480fbf0bdaeb
parentMerge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-06-14' in... (diff)
downloadqemu-1e40d19877031120631295348c26f43bea08afed.tar.gz
qemu-1e40d19877031120631295348c26f43bea08afed.tar.xz
qemu-1e40d19877031120631295348c26f43bea08afed.zip
vhost-user-gpu: do not send scanout update if no GPU socket
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>
-rw-r--r--contrib/vhost-user-gpu/main.c2
1 files changed, 1 insertions, 1 deletions
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),