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 <ppaalanen@gmail.com>
This commit is contained in:
Pekka Paalanen 2012-10-10 12:49:26 +03:00 committed by Kristian Høgsberg
parent 8e159180cc
commit 71f6f3b04c

View file

@ -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;