diff options
author | Mikkel Oscar Lyderik <mikkeloscar@users.noreply.github.com> | 2016-04-30 00:50:42 +0200 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@users.noreply.github.com> | 2016-04-30 00:50:42 +0200 |
commit | 75aa3b1be4afe8cef7e678e8a7a665d59c847886 (patch) | |
tree | e53925fe2d81085a65b9eeed1f269a8eafdfee84 /sway/workspace.c | |
parent | ed8c67e2908f0370b8d665ebc09f75e784dafeac (diff) | |
parent | 0ece17c717eea8e5a4e1a02a9d0e9ba2fae075bf (diff) |
Merge pull request #616 from neosilky/memleak
sway/workspace.c: Cleanup some un-free'd memory
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) { strcmp(_target, "current") == 0) { free(_target); + free(dup); continue; } // Make sure that the workspace doesn't already exist if (workspace_by_name(_target)) { free(_target); + free(dup); continue; } @@ -92,6 +94,7 @@ char *workspace_next_name(const char *output_name) { // output if (!workspace_valid_on_output(output_name, _target)) { free(_target); + free(dup); continue; } @@ -99,6 +102,8 @@ char *workspace_next_name(const char *output_name) { order = binding->order; target = _target; sway_log(L_DEBUG, "Workspace: Found free name %s", _target); + free(dup); + break; } } free(dup); |