mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
menu: fix memory leak in update_client_send_to_menu() (#2252)
This commit is contained in:
parent
1d79e34c2b
commit
bb87ca5493
1 changed files with 4 additions and 2 deletions
|
|
@ -943,8 +943,10 @@ update_client_send_to_menu(struct server *server)
|
||||||
|
|
||||||
wl_list_for_each(workspace, &server->workspaces.all, link) {
|
wl_list_for_each(workspace, &server->workspaces.all, link) {
|
||||||
if (workspace == server->workspaces.current) {
|
if (workspace == server->workspaces.current) {
|
||||||
current_item = item_create(menu, strdup_printf(">%s<", workspace->name),
|
char *label = strdup_printf(">%s<", workspace->name);
|
||||||
|
current_item = item_create(menu, label,
|
||||||
/*show arrow*/ false);
|
/*show arrow*/ false);
|
||||||
|
free(label);
|
||||||
} else {
|
} else {
|
||||||
current_item = item_create(menu, workspace->name, /*show arrow*/ false);
|
current_item = item_create(menu, workspace->name, /*show arrow*/ false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue