From 0deef6fe44a939a47a170fa8eae55c9ea08520d9 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Fri, 3 Jun 2022 00:15:42 +0200 Subject: output: fix leak of empty back buffer lock This refactors output_ensure_buffer() to not mutate the state passed, making the previous subtle behavior much more explicit. Fixes: d483dd2f ("output: add wlr_output_commit_state") Closes: #3442 --- include/types/wlr_output.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/types/wlr_output.h b/include/types/wlr_output.h index 9223407a..5f0cbe33 100644 --- a/include/types/wlr_output.h +++ b/include/types/wlr_output.h @@ -13,6 +13,6 @@ struct wlr_drm_format *output_pick_format(struct wlr_output *output, const struct wlr_drm_format_set *display_formats, uint32_t format); void output_clear_back_buffer(struct wlr_output *output); bool output_ensure_buffer(struct wlr_output *output, - struct wlr_output_state *state); + const struct wlr_output_state *state, bool *new_back_buffer); #endif -- cgit v1.2.3