diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-03-01 15:49:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-03-01 15:50:53 +0000 |
commit | 9f61007bb01ac7f47fa164e4cb252a4338ee9bdc (patch) | |
tree | 1f1ae8b585a149657825f489772edb2e45c6c510 /vcl | |
parent | d45c60daf83003507ff6556e6fbc43ddc8abb673 (diff) |
valgrind: fix g_variant leak
Change-Id: I6d10c7d20f9bc1dfcaa60ad89a9092fe06922074
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk/gtksalmenu.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index d828a7cc259a..5634922680e4 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -825,13 +825,19 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection, if ( bIsSubmenu ) g_lo_menu_set_submenu_action_to_item_in_section( pMenu, nSection, nItemPos, aItemCommand ); else + { g_lo_menu_set_action_and_target_value_to_item_in_section( pMenu, nSection, nItemPos, aItemCommand, pTarget ); + pTarget = nullptr; + } g_free( aItemCommand ); } if ( aCurrentCommand ) g_free( aCurrentCommand ); + + if (pTarget) + g_variant_unref(pTarget); } GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSubmenu ) |