summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/gtksalmenu.cxx
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-09-22 03:23:01 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2016-09-22 12:17:29 +0300
commit7acac4e5b2635f561143701c9634941293f6db14 (patch)
tree95feefc5a7b16ac2832bd4b4bff3d456de113dd9 /vcl/unx/gtk/gtksalmenu.cxx
parent77bb1d838e1730a552346108fd608b373a05d3c8 (diff)
Fix memleak in GtkSalMenu::NativeSetItemCommand
Change-Id: Id952f3dc236d2dc2c6839ce75943bda162fabf82
Diffstat (limited to 'vcl/unx/gtk/gtksalmenu.cxx')
-rw-r--r--vcl/unx/gtk/gtksalmenu.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 0573e6c92905..be68eff0522e 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -977,6 +977,7 @@ bool GtkSalMenu::NativeSetItemCommand( unsigned nSection,
gchar* pLabel = g_lo_menu_get_label_from_item_in_section(pMenu, nSection, nItemPos);
g_lo_menu_remove_from_section(pMenu, nSection, nItemPos);
g_lo_menu_insert_in_section(pMenu, nSection, nItemPos, pLabel);
+ g_free(pLabel);
}
g_lo_menu_set_command_to_item_in_section( pMenu, nSection, nItemPos, aCommand );