Memory leak, GitHub issue 4298.

This commit is contained in:
nicm 2024-12-16 08:54:34 +00:00
parent 106d1c3538
commit bec6ce54c1

View File

@ -1044,9 +1044,12 @@ mode_tree_display_menu(struct mode_tree_data *mtd, struct client *c, u_int x,
else else
x = 0; x = 0;
if (menu_display(menu, 0, 0, NULL, x, y, c, BOX_LINES_DEFAULT, NULL, if (menu_display(menu, 0, 0, NULL, x, y, c, BOX_LINES_DEFAULT, NULL,
NULL, NULL, NULL, mode_tree_menu_callback, mtm) != 0) NULL, NULL, NULL, mode_tree_menu_callback, mtm) != 0) {
mode_tree_remove_ref(mtd);
free(mtm);
menu_free(menu); menu_free(menu);
} }
}
int int
mode_tree_key(struct mode_tree_data *mtd, struct client *c, key_code *key, mode_tree_key(struct mode_tree_data *mtd, struct client *c, key_code *key,