From 9314c45c418c97fa415ef86cf834c3c87499d100 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Wed, 4 Jul 2018 18:51:21 +0900 Subject: [PATCH] workspace_next_name: free targets later than these already found in order --- sway/tree/workspace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index 2db06a31..51f0fcb4 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c @@ -191,6 +191,8 @@ char *workspace_next_name(const char *output_name) { free(target); target = _target; wlr_log(L_DEBUG, "Workspace: Found free name %s", _target); + } else { + free(_target); } } free(dup);