diff options
author | taiyu <taiyu.len@gmail.com> | 2015-08-23 19:09:18 -0700 |
---|---|---|
committer | taiyu <taiyu.len@gmail.com> | 2015-08-23 19:09:18 -0700 |
commit | c8415d7fef53a9efa776dcbbaa2c9c2d76ff8b49 (patch) | |
tree | 6316fab4aff82a5f3a6dbba2dc4057dd2a2d880d /sway/workspace.c | |
parent | Merge pull request #121 from taiyu-len/pointer_mod (diff) | |
download | sway-c8415d7fef53a9efa776dcbbaa2c9c2d76ff8b49.tar.gz sway-c8415d7fef53a9efa776dcbbaa2c9c2d76ff8b49.tar.zst sway-c8415d7fef53a9efa776dcbbaa2c9c2d76ff8b49.zip |
split_string memory leaks cleanedup
Diffstat (limited to 'sway/workspace.c')
-rw-r--r-- | sway/workspace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/workspace.c b/sway/workspace.c index 80b67128..4c8bb62f 100644 --- a/sway/workspace.c +++ b/sway/workspace.c | |||
@@ -42,22 +42,22 @@ char *workspace_next_name(void) { | |||
42 | strcmp(target, "back_and_forth") == 0 || | 42 | strcmp(target, "back_and_forth") == 0 || |
43 | strcmp(target, "current") == 0) | 43 | strcmp(target, "current") == 0) |
44 | { | 44 | { |
45 | list_free(args); | 45 | free_flat_list(args); |
46 | continue; | 46 | continue; |
47 | } | 47 | } |
48 | 48 | ||
49 | // Make sure that the workspace doesn't already exist | 49 | // Make sure that the workspace doesn't already exist |
50 | if (workspace_by_name(target)) { | 50 | if (workspace_by_name(target)) { |
51 | list_free(args); | 51 | free_flat_list(args); |
52 | continue; | 52 | continue; |
53 | } | 53 | } |
54 | 54 | ||
55 | list_free(args); | 55 | free_flat_list(args); |
56 | 56 | ||
57 | sway_log(L_DEBUG, "Workspace: Found free name %s", target); | 57 | sway_log(L_DEBUG, "Workspace: Found free name %s", target); |
58 | return target; | 58 | return target; |
59 | } | 59 | } |
60 | list_free(args); | 60 | free_flat_list(args); |
61 | } | 61 | } |
62 | // As a fall back, get the current number of active workspaces | 62 | // As a fall back, get the current number of active workspaces |
63 | // and return that + 1 for the next workspace's name | 63 | // and return that + 1 for the next workspace's name |