From 702eed5cbd5a67ec0b0958638e193580fd0b3b55 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 18 Jan 2021 22:31:09 +0100 Subject: [PATCH] backend/x11: fix region not being actually used The region variable was shadowed in an if block. As a result, in the outer block region was always XCB_NONE and was never destroyed (causing a memory leak on the server). Reported-by: Ilia Mirkin --- backend/x11/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/x11/output.c b/backend/x11/output.c index fe178b72..2065aea3 100644 --- a/backend/x11/output.c +++ b/backend/x11/output.c @@ -250,7 +250,7 @@ static bool output_commit_buffer(struct wlr_x11_output *output) { }; } - xcb_xfixes_region_t region = xcb_generate_id(x11->xcb); + region = xcb_generate_id(x11->xcb); xcb_xfixes_create_region(x11->xcb, region, rects_len, xcb_rects); free(xcb_rects);