output: fix leak of wlr_drm_format

This commit is contained in:
Isaac Freund 2021-11-06 13:32:43 +01:00
parent e13f3f8608
commit 8634dd3e6a
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11
1 changed files with 1 additions and 0 deletions

View File

@ -264,6 +264,7 @@ static struct wlr_buffer *render_cursor_buffer(struct wlr_output_cursor *cursor)
wlr_swapchain_destroy(output->cursor_swapchain);
output->cursor_swapchain = wlr_swapchain_create(allocator,
width, height, format);
free(format);
if (output->cursor_swapchain == NULL) {
wlr_log(WLR_ERROR, "Failed to create cursor swapchain");
return NULL;