patch 9.2.0554: GTK4: memory leak in free_menu()
Commit:
https://github.com/vim/vim/commit/81d42cf1aaba17ca3a0835d54ed2a17e849084e5
Author: Foxe Chen <[email protected]>
Date: Thu May 28 21:17:23 2026 +0000
patch 9.2.0554: GTK4: memory leak in free_menu()
Problem: GTK4: memory leak in free_menu()
Solution: Free the label (Foxe Chen)
closes: #20343
Signed-off-by: Foxe Chen <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/menu.c b/src/menu.c
index 861d78711..5fd83d80b 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1074,6 +1074,10 @@ free_menu(vimmenu_T **menup)
// Also may rebuild a tearoff'ed menu
if (gui.in_use)
gui_mch_destroy_menu(menu);
+# ifdef USE_GTK4
+ // GTK4 uses "menu->label" for action name
+ vim_free((char_u *)menu->label);
+# endif
#endif
// Don't change *menup until after calling gui_mch_destroy_menu(). The
diff --git a/src/version.c b/src/version.c
index b7f9b8ed3..9e5b5cc02 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 554,
/**/
553,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1wSiIl-00BXI5-IA%40256bit.org.