mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
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)
This commit is contained in:
parent
e049989bc3
commit
c6a50a8194
@ -1,3 +1,8 @@
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user