[gedit] Fix memory leak.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Fix memory leak.
- Date: Tue, 15 Feb 2011 17:01:12 +0000 (UTC)
commit 280c59df172b0da655cc810b2eccba5ec44ce07b
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Fri Feb 11 17:11:23 2011 +0100
Fix memory leak.
gedit/gedit-overlay.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gedit/gedit-overlay.c b/gedit/gedit-overlay.c
index fce6db3..1ec7822 100644
--- a/gedit/gedit-overlay.c
+++ b/gedit/gedit-overlay.c
@@ -444,21 +444,20 @@ static void
gedit_overlay_remove (GtkContainer *overlay,
GtkWidget *widget)
{
- GeditOverlay *goverlay = GEDIT_OVERLAY (overlay);
+ GeditOverlayPrivate *goverlay = GEDIT_OVERLAY (overlay)->priv;
GSList *l;
- for (l = goverlay->priv->children; l != NULL; l = g_slist_next (l))
+ for (l = priv->children; l != NULL; l = g_slist_next (l))
{
- GtkWidget *child = GTK_WIDGET (l->data);
+ GtkWidget *child = l->data;
if (child == widget)
{
gtk_widget_unparent (widget);
- goverlay->priv->children = g_slist_remove_link (goverlay->priv->children,
- l);
+ priv->children = g_slist_remove_link (priv->children,
+ l);
- /* FIXME: gtk_widget_destroy? */
- g_object_unref (child);
+ g_slist_free (l);
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]