mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
split_string memory leaks cleanedup
This commit is contained in:
parent
9a7f48f872
commit
c8415d7fef
4 changed files with 11 additions and 7 deletions
|
|
@ -42,22 +42,22 @@ char *workspace_next_name(void) {
|
|||
strcmp(target, "back_and_forth") == 0 ||
|
||||
strcmp(target, "current") == 0)
|
||||
{
|
||||
list_free(args);
|
||||
free_flat_list(args);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Make sure that the workspace doesn't already exist
|
||||
if (workspace_by_name(target)) {
|
||||
list_free(args);
|
||||
free_flat_list(args);
|
||||
continue;
|
||||
}
|
||||
|
||||
list_free(args);
|
||||
free_flat_list(args);
|
||||
|
||||
sway_log(L_DEBUG, "Workspace: Found free name %s", target);
|
||||
return target;
|
||||
}
|
||||
list_free(args);
|
||||
free_flat_list(args);
|
||||
}
|
||||
// As a fall back, get the current number of active workspaces
|
||||
// and return that + 1 for the next workspace's name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue