diff options
Diffstat (limited to 'hw/vhost.c')
-rw-r--r-- | hw/vhost.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vhost.c b/hw/vhost.c index 541c7163b2..d924fb0e4d 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -456,7 +456,7 @@ static void vhost_region_del(MemoryListener *listener, == section->offset_within_address_space) { --dev->n_mem_sections; memmove(&dev->mem_sections[i], &dev->mem_sections[i+1], - dev->n_mem_sections - i); + (dev->n_mem_sections - i) * sizeof(*dev->mem_sections)); break; } } |