[gnome-calendar] month-view: fix ::forall impl leaking
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] month-view: fix ::forall impl leaking
- Date: Fri, 26 Dec 2014 17:07:06 +0000 (UTC)
commit 443a502b1f4c08ed10b3be21b517fe0aa89e203a
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Fri Dec 26 12:02:15 2014 -0500
month-view: fix ::forall impl leaking
src/gcal-month-view.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index eee5c9e..b6ccf86 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -1737,16 +1737,18 @@ gcal_month_view_forall (GtkContainer *container,
gpointer callback_data)
{
GcalMonthViewPrivate *priv;
- GList *l, *aux;
+ GList *l, *l2, *aux;
priv = gcal_month_view_get_instance_private (GCAL_MONTH_VIEW (container));
aux = NULL;
- for (l = g_hash_table_get_values (priv->children); l != NULL; l = g_list_next (l))
+ l2 = g_hash_table_get_values (priv->children);
+ for (l = l2; l != NULL; l = g_list_next (l))
aux = g_list_concat (aux, g_list_reverse (g_list_copy (l->data)));
- g_list_free (l);
+ g_list_free (l2);
+ l = aux;
while (aux != NULL)
{
GtkWidget *widget = (GtkWidget*) aux->data;
@@ -1754,7 +1756,7 @@ gcal_month_view_forall (GtkContainer *container,
(*callback) (widget, callback_data);
}
- g_list_free (aux);
+ g_list_free (l);
}
/* GcalView Interface API */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]