diff options
Diffstat (limited to 'sway/workspace.c')
-rw-r--r-- | sway/workspace.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/workspace.c b/sway/workspace.c index 90edc6e9..17b56416 100644 --- a/sway/workspace.c +++ b/sway/workspace.c | |||
@@ -79,12 +79,14 @@ char *workspace_next_name(const char *output_name) { | |||
79 | strcmp(_target, "current") == 0) | 79 | strcmp(_target, "current") == 0) |
80 | { | 80 | { |
81 | free(_target); | 81 | free(_target); |
82 | free(dup); | ||
82 | continue; | 83 | continue; |
83 | } | 84 | } |
84 | 85 | ||
85 | // Make sure that the workspace doesn't already exist | 86 | // Make sure that the workspace doesn't already exist |
86 | if (workspace_by_name(_target)) { | 87 | if (workspace_by_name(_target)) { |
87 | free(_target); | 88 | free(_target); |
89 | free(dup); | ||
88 | continue; | 90 | continue; |
89 | } | 91 | } |
90 | 92 | ||
@@ -92,6 +94,7 @@ char *workspace_next_name(const char *output_name) { | |||
92 | // output | 94 | // output |
93 | if (!workspace_valid_on_output(output_name, _target)) { | 95 | if (!workspace_valid_on_output(output_name, _target)) { |
94 | free(_target); | 96 | free(_target); |
97 | free(dup); | ||
95 | continue; | 98 | continue; |
96 | } | 99 | } |
97 | 100 | ||
@@ -99,6 +102,8 @@ char *workspace_next_name(const char *output_name) { | |||
99 | order = binding->order; | 102 | order = binding->order; |
100 | target = _target; | 103 | target = _target; |
101 | sway_log(L_DEBUG, "Workspace: Found free name %s", _target); | 104 | sway_log(L_DEBUG, "Workspace: Found free name %s", _target); |
105 | free(dup); | ||
106 | break; | ||
102 | } | 107 | } |
103 | } | 108 | } |
104 | free(dup); | 109 | free(dup); |