summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-04-15 00:09:19 +0200
committerraveit65 <[email protected]>2019-04-15 15:29:21 +0200
commitae98b909e347ae7dadb0a57a22dbca3cf2231f33 (patch)
treee41bdb92e3e074871275b526e73e33af5a99b315 /src/ui
parent997a98620450caa09cb46862cbe0f29a03d092eb (diff)
downloadmarco-ae98b909e347ae7dadb0a57a22dbca3cf2231f33.tar.bz2
marco-ae98b909e347ae7dadb0a57a22dbca3cf2231f33.tar.xz
Remove unnecessary GClosureNotify methods
Fixes double free of menu_data introduced in b0df98a
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/menu.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/ui/menu.c b/src/ui/menu.c
index 90db5f1e..aeba64fa 100644
--- a/src/ui/menu.c
+++ b/src/ui/menu.c
@@ -100,21 +100,6 @@ static MenuItem menuitems[] = {
{META_MENU_OP_DELETE, MENU_ITEM_IMAGE, MARCO_STOCK_DELETE, FALSE, N_("_Close")}
};
-static void
-sn_menu_data_free (MenuData *menu_data,
- GClosure *closure)
-{
- g_free (menu_data->menu);
- g_free (menu_data);
-}
-
-static void
-sn_menu_item_free (MenuItem *menu_item,
- GClosure *closure)
-{
- g_free (menu_item);
-}
-
static void popup_position_func(GtkMenu* menu, gint* x, gint* y, gboolean* push_in, gpointer user_data)
{
GtkRequisition req;
@@ -457,7 +442,7 @@ meta_window_menu_new (MetaFrames *frames,
"activate",
G_CALLBACK (activate_cb),
md,
- (GClosureNotify) sn_menu_data_free, 0);
+ (GClosureNotify) g_free, 0);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), submi);
@@ -484,7 +469,7 @@ meta_window_menu_new (MetaFrames *frames,
"activate",
G_CALLBACK (activate_cb),
md,
- (GClosureNotify) sn_menu_item_free, 0);
+ (GClosureNotify) g_free, 0);
}
if (mi)