:: commit ba28de10cc5947d891c98654f602121fb9ea48ae

Mintsuki <mintsuki@protonmail.com> — 2026-02-08 06:30

parents: 22400c3f28

menu: Fix tree_prefix free size to match allocation

diff --git a/common/menu.c b/common/menu.c
index 73726125..71ce8e7d 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -1107,7 +1107,7 @@ refresh:
         max_entries = print_tree(tree_offset, terms[0]->rows - 8, tree_prefix, 0, 0, selected_entry, menu_tree,
                                  &selected_menu_entry, NULL, NULL);
 
-        pmm_free(tree_prefix, tree_prefix_len);
+        pmm_free(tree_prefix, tree_prefix_len + 1);
     }
 
     {
tab: 248 wrap: offon