Memory leaks in cmd_display_menu, from Huihui Huang.

This commit is contained in:
nicm
2026-02-23 08:50:00 +00:00
parent 50a3b4c777
commit 8c7278b53a
2 changed files with 21 additions and 16 deletions

3
menu.c
View File

@@ -161,6 +161,9 @@ menu_free(struct menu *menu)
{
u_int i;
if (menu == NULL)
return;
for (i = 0; i < menu->count; i++) {
free((void *)menu->items[i].name);
free((void *)menu->items[i].command);