mirror of
https://github.com/labwc/labwc.git
synced 2026-04-16 08:21:26 -04:00
menu: use new_text directly instead of copying
Since otherwise it causes a memory leak: `new_text` used to be allocated, but never free'd.
This commit is contained in:
parent
f1155e0020
commit
d49a2d3ad1
1 changed files with 1 additions and 1 deletions
|
|
@ -182,7 +182,7 @@ item_create(struct menu *menu, char *text, const char *icon_name, bool show_arro
|
|||
|
||||
menuitem->accelerator = accelerator;
|
||||
if (new_text) {
|
||||
menuitem->text = xstrdup(new_text);
|
||||
menuitem->text = new_text;
|
||||
menuitem->use_markup = true;
|
||||
} else {
|
||||
menuitem->text = xstrdup(text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue