]> xenbits.xensource.com Git - qemu-upstream-4.4-testing.git/commitdiff
spice: (32 bit only) fix surface cmd tracking destruction
authorAlon Levy <alevy@redhat.com>
Wed, 13 Mar 2013 15:58:35 +0000 (17:58 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 16 Apr 2013 09:52:09 +0000 (11:52 +0200)
No change for 64 bit arches, but for 32 bit previously we zeroed half
the surfaces cmd array, instead of all of it.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/qxl.c

index 1f7c8fe13b4a60aa750a38da31be8cf9056c0069..cb47995b84854cbcd18bf7210f59d87a95f88a34 100644 (file)
@@ -230,7 +230,7 @@ static void qxl_spice_destroy_surfaces_complete(PCIQXLDevice *qxl)
     trace_qxl_spice_destroy_surfaces_complete(qxl->id);
     qemu_mutex_lock(&qxl->track_lock);
     memset(qxl->guest_surfaces.cmds, 0,
-           sizeof(qxl->guest_surfaces.cmds) * qxl->ssd.num_surfaces);
+           sizeof(qxl->guest_surfaces.cmds[0]) * qxl->ssd.num_surfaces);
     qxl->guest_surfaces.count = 0;
     qemu_mutex_unlock(&qxl->track_lock);
 }