diff options
author | emersion <[email protected]> | 2018-04-24 22:04:19 +0100 |
---|---|---|
committer | emersion <[email protected]> | 2018-04-24 22:28:55 +0100 |
commit | aa36899d8a54d359bf3da997fb6f681199e49938 (patch) | |
tree | 096f6c4635168e71e29e611cebc9afac9e22736b /swaybar/ipc.c | |
parent | 317b8cbd9374dafa0c8649e9db45cdee7b748fd2 (diff) |
Fix a bunch of swaybar memory leaks
Diffstat (limited to 'swaybar/ipc.c')
-rw-r--r-- | swaybar/ipc.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c index ed5d9a31..959fa095 100644 --- a/swaybar/ipc.c +++ b/swaybar/ipc.c @@ -216,15 +216,6 @@ static void ipc_parse_config( json_object_put(bar_config); } -static void free_workspaces(struct wl_list *list) { - struct swaybar_workspace *ws, *tmp; - wl_list_for_each_safe(ws, tmp, list, link) { - wl_list_remove(&ws->link); - free(ws->name); - free(ws); - } -} - void ipc_get_workspaces(struct swaybar *bar) { bar->focused_output = NULL; struct swaybar_output *output; @@ -290,8 +281,8 @@ static void ipc_get_outputs(struct swaybar *bar) { continue; } if (bar->config->all_outputs) { - struct config_output *coutput = calloc( - 1, sizeof(struct config_output)); + struct config_output *coutput = + calloc(1, sizeof(struct config_output)); coutput->name = strdup(name); coutput->index = i; wl_list_insert(&bar->config->outputs, &coutput->link); |