mirror of
https://github.com/tmux/tmux.git
synced 2026-03-05 23:35:35 +00:00
Fix memory leak, from Emmanuel Ugwu in GitHub issue 4900.
This commit is contained in:
1
menu.c
1
menu.c
@@ -90,6 +90,7 @@ menu_add_item(struct menu *menu, const struct menu_item *item,
|
|||||||
else
|
else
|
||||||
s = format_single(qitem, item->name, c, NULL, NULL, NULL);
|
s = format_single(qitem, item->name, c, NULL, NULL, NULL);
|
||||||
if (*s == '\0') { /* no item if empty after format expanded */
|
if (*s == '\0') { /* no item if empty after format expanded */
|
||||||
|
free(s);
|
||||||
menu->count--;
|
menu->count--;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user