Use autofree heap allocation instead of variable-length array on the stack.
Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> --- ui/spice-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/spice-display.c b/ui/spice-display.c index d22781a23d0..61c4259363b 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -188,7 +188,7 @@ static void qemu_spice_create_update(SimpleSpiceDisplay *ssd) { static const int blksize = 32; int blocks = DIV_ROUND_UP(surface_width(ssd->ds), blksize); - int dirty_top[blocks]; + g_autofree int *dirty_top = g_new(int, blocks); int y, yoff1, yoff2, x, xoff, blk, bw; int bpp = surface_bytes_per_pixel(ssd->ds); uint8_t *guest, *mirror; -- 2.26.3