win: fix leak in win_bind_mask

Related: #905

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2022-10-10 13:55:05 +01:00
parent 7107241519
commit 8a373c38a6
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 2 additions and 0 deletions

View File

@ -350,6 +350,8 @@ bool win_bind_mask(struct backend_base *b, struct managed_win *w) {
pixman_region32_translate(&reg_bound_local, -w->g.x, -w->g.y);
w->mask_image = b->ops->make_mask(
b, (geometry_t){.width = w->g.width, .height = w->g.height}, &reg_bound_local);
pixman_region32_fini(&reg_bound_local);
if (!w->mask_image) {
return false;
}