From f531e86f7c56183c8c4f9da4b209c7ab207a0f7d Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Thu, 16 Jan 2020 19:49:52 -0500 Subject: [PATCH] desktop/output: fix mem leak in handle_new_output This fixes a memory leak of oc (the output config) in handle_new_output. Output configs returned from find_output_config are not stored and need to be freed after use. --- sway/desktop/output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sway/desktop/output.c b/sway/desktop/output.c index b1767efc4..afe43d2ce 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -901,6 +901,7 @@ void handle_new_output(struct wl_listener *listener, void *data) { } else { wlr_output_enable(output->wlr_output, false); } + free_output_config(oc); transaction_commit_dirty();