diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libnma/nma-ui-utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libnma/nma-ui-utils.c b/src/libnma/nma-ui-utils.c index 7649ee54..99e2e972 100644 --- a/src/libnma/nma-ui-utils.c +++ b/src/libnma/nma-ui-utils.c @@ -339,17 +339,18 @@ nma_utils_menu_to_secret_flags (GtkWidget *passwd_entry) /* Translate password popup menu to secret flags */ if (menu) { MenuItem idx = 0; - GList *list; + gs_free_list GList *list = NULL; int i, length; list = gtk_container_get_children (GTK_CONTAINER (menu)); + iter = list; length = g_list_length (list); for (i = 0; i < length; i++) { - if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (list->data))) { + if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (iter->data))) { idx = (MenuItem) i; break; } - list = g_list_next (list); + iter = g_list_next (iter); } flags = menu_item_to_secret_flags (idx); |