backend-wayland: fix memory leak in wayland_shm_buffer_attach
Since the pixman_region32_t damage is initialized unconditionally, also finalize it unconditionally. Otherwise we leak rectangle memory when sb->output->frame is NULL. Reported-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
0d4c523c4c
commit
2c7dceced7
|
@ -603,8 +603,7 @@ wayland_shm_buffer_attach(struct wayland_shm_buffer *sb)
|
|||
rects[i].y1, rects[i].x2 - rects[i].x1,
|
||||
rects[i].y2 - rects[i].y1);
|
||||
|
||||
if (sb->output->frame)
|
||||
pixman_region32_fini(&damage);
|
||||
pixman_region32_fini(&damage);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in New Issue