From: Alon Levy Date: Wed, 13 Mar 2013 15:58:35 +0000 (+0200) Subject: spice: (32 bit only) fix surface cmd tracking destruction X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8bb9f51ca243551fb838a3a6a2983016ed2bbb73;p=qemu.git spice: (32 bit only) fix surface cmd tracking destruction 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 Signed-off-by: Gerd Hoffmann --- diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 1f7c8fe13b..cb47995b84 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -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); }