Commit c6a50a81 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Don't leak the list of children (#357454, Paolo Borelli)

2006-09-25  Matthias Clasen  <mclasen@redhat.com>
        * gtk/gtkuimanager.c (_gtk_menu_is_empty): Don't leak
        the list of children (#357454, Paolo Borelli)
parent e049989b
2006-09-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkuimanager.c (_gtk_menu_is_empty): Don't leak
the list of children (#357454, Paolo Borelli)
2006-09-25 Michael Natterer <mitch@imendio.com>
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): free
......
......@@ -1941,6 +1941,7 @@ gboolean
_gtk_menu_is_empty (GtkWidget *menu)
{
GList *children, *cur;
gboolean result = TRUE;
g_return_val_if_fail (menu == NULL || GTK_IS_MENU (menu), TRUE);
......@@ -1956,13 +1957,16 @@ _gtk_menu_is_empty (GtkWidget *menu)
{
if (!GTK_IS_TEAROFF_MENU_ITEM (cur->data) &&
!g_object_get_data (cur->data, "gtk-empty-menu-item"))
return FALSE;
{
result = FALSE;
break;
}
}
cur = cur->next;
}
g_list_free (children);
return TRUE;
return result;
}
enum {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment