memory leak in xfwm4 menu.c
David Agraz
dagraz at gmail.com
Tue Dec 7 05:49:47 CET 2004
We leak a MenuData in menu.c : menu_default
switch (menuitems[i].op)
{
case MENU_OP_SEPARATOR:
menuitem = gtk_separator_menu_item_new ();
break;
case MENU_OP_WORKSPACES:
menuitem = gtk_menu_item_new_with_mnemonic (label);
if (insensitive & menuitems[i].op)
{
gtk_widget_set_sensitive (menuitem, FALSE);
}
ws_menu = menu_workspace (menu, insensitive, ws,
nws, wsn, wsnl);
gtk_menu_item_set_submenu (GTK_MENU_ITEM
(menuitem), ws_menu);
menudata = g_new (MenuData, 1);
menudata->menu = menu;
menudata->op = menuitems[i].op;
menudata->data = data;
break;
At this point, we leak the menudata we just allocated. Are we missing
a call to menu_item_connect (menuitem, menudata)?
More information about the Xfce4-dev
mailing list