Skip to contentSkip to conversation

qxl: make sure we don't have a stale ds_mirror hanging around

PATCH New Gerd Hoffmann 1 participant 1 message Nov 1, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qxl: make sure we don't have a stale ds_mirror hanging around

ui/spice-display.c uses ds_mirror to figure which screen areas did actually change. This is active when the qxl card is in vga mode or a non-qxl gfx card is used. A display resize invalidates ds_mirror, and it is handled by simply simply freeing ds_mirror. The next screen update it will be re-allocated as needed.

With qxl there is another possible code path which can invalidate
ds_mirror: leave vga mode and re-enter vga mode. Make sure we free ds_mirror here too.

https://bugzilla.redhat.com/show_bug.cgi?id=865767

---
 hw/qxl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
hw/qxl.c +2 -0
index dfb221a..f25c89d 100644
@@ -1070,6 +1070,8 @@ static void qxl_enter_vga_mode(PCIQXLDevice *d)
     qemu_spice_create_host_primary(&d->ssd);
     d->mode = QXL_MODE_VGA;
     memset(&d->ssd.dirty, 0, sizeof(d->ssd.dirty));
+    g_free(d->ssd.ds_mirror);
+    d->ssd.ds_mirror = NULL;
     vga_dirty_log_start(&d->vga);
 }
 
Signature · 1 line
1.7.1