From 71f6f3b04c51cdb45c70ddcea8b3e621a39847df Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Wed, 10 Oct 2012 12:49:26 +0300 Subject: [PATCH] shell: do not double-init a region weston_surface_create() already inits the opaque region, so the second init in create_black_surface() is logically wrong. Whether this was a memory leak or not, depends on Pixman internals. Fini before initing again. Signed-off-by: Pekka Paalanen --- src/shell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shell.c b/src/shell.c index c799409..4600be3 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1632,6 +1632,7 @@ create_black_surface(struct weston_compositor *ec, surface->private = fs_surface; weston_surface_configure(surface, x, y, w, h); weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1); + pixman_region32_fini(&surface->opaque); pixman_region32_init_rect(&surface->opaque, 0, 0, w, h); return surface; -- 2.7.4