[gnome-calendar] date-selector: fix memory leak
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] date-selector: fix memory leak
- Date: Fri, 26 Dec 2014 15:13:07 +0000 (UTC)
commit 9638db32e637fc97a9e5a395db5278baaf74e6a0
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Dec 25 18:47:04 2014 -0500
date-selector: fix memory leak
src/gcal-date-selector.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gcal-date-selector.c b/src/gcal-date-selector.c
index fbf1657..37263d5 100644
--- a/src/gcal-date-selector.c
+++ b/src/gcal-date-selector.c
@@ -291,7 +291,7 @@ gcal_date_selector_constructed (GObject *object)
GcalDateSelectorPrivate *priv;
GtkWidget *label, *box;
- GList *l;
+ GList *l, *aux;
priv = gcal_date_selector_get_instance_private (GCAL_DATE_SELECTOR (object));
@@ -308,7 +308,8 @@ gcal_date_selector_constructed (GObject *object)
/* retrieve components from UI definition: entries */
box = gtk_grid_get_child_at (GTK_GRID (priv->grid), 0, 1);
- for (l = gtk_container_get_children (GTK_CONTAINER (box)); l != NULL; l = g_list_next (l))
+ aux = gtk_container_get_children (GTK_CONTAINER (box));
+ for (l = aux; l != NULL; l = g_list_next (l))
{
gint position;
gtk_container_child_get (GTK_CONTAINER (box), l->data, "position", &position, NULL);
@@ -322,6 +323,7 @@ gcal_date_selector_constructed (GObject *object)
if (position == priv->day_pos || position == priv->month_pos)
gtk_entry_set_max_length (GTK_ENTRY (l->data), 2);
}
+ g_list_free (aux);
}
/* Public API */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]