aboutsummaryrefslogtreecommitdiff
path: root/ui/spice-display.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-01-22 13:56:11 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-01-22 13:56:11 +0000
commitadeecf14d668f5f0a73c9be91772e15b4f8727f3 (patch)
tree8011d0cf9b9f6eed058dd3211c8aab7d8acf4add /ui/spice-display.c
parentb3a4755a67a52aa7297eb8927b482d09dabdefec (diff)
parent51a090991449c7d3c6d428eda18b4f30a36e2c1b (diff)
Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20150122-1' into staging
spice: fix coverity defect, add unix address support # gpg: Signature made Thu 22 Jan 2015 11:17:24 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/spice/tags/pull-spice-20150122-1: spice: fix coverity reported defect in display code spice: add unix address support Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/spice-display.c')
-rw-r--r--ui/spice-display.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 8c872129de..16441852e4 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -438,9 +438,6 @@ void qemu_spice_display_switch(SimpleSpiceDisplay *ssd,
qemu_mutex_lock(&ssd->lock);
need_destroy = (ssd->ds != NULL);
ssd->ds = surface;
- ssd->surface = pixman_image_ref(ssd->ds->image);
- ssd->mirror = qemu_pixman_mirror_create(ssd->ds->format,
- ssd->ds->image);
while ((update = QTAILQ_FIRST(&ssd->updates)) != NULL) {
QTAILQ_REMOVE(&ssd->updates, update, next);
qemu_spice_destroy_update(ssd, update);
@@ -450,6 +447,9 @@ void qemu_spice_display_switch(SimpleSpiceDisplay *ssd,
qemu_spice_destroy_host_primary(ssd);
}
if (ssd->ds) {
+ ssd->surface = pixman_image_ref(ssd->ds->image);
+ ssd->mirror = qemu_pixman_mirror_create(ssd->ds->format,
+ ssd->ds->image);
qemu_spice_create_host_primary(ssd);
}