[epiphany] ephy-link-action.c: plug memory leak
- From: Xan Lopez <xan src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-link-action.c: plug memory leak
- Date: Wed, 2 Sep 2009 19:20:28 +0000 (UTC)
commit 0094e74a6d97f3c553afb0916579480f1e11d3d4
Author: Xan Lopez <xan gnome org>
Date: Wed Sep 2 22:19:22 2009 +0300
ephy-link-action.c: plug memory leak
Noticed by Dan Winship.
src/ephy-link-action.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-link-action.c b/src/ephy-link-action.c
index a5049c4..0447663 100644
--- a/src/ephy-link-action.c
+++ b/src/ephy-link-action.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2004 Christian Persch
* Copyright © 2005 Philip Langdale
@@ -84,9 +85,13 @@ get_event_widget (GtkWidget *proxy)
* The menu tool button's button is the first child
* of the child hbox.
*/
- GtkContainer *container =
- GTK_CONTAINER (gtk_bin_get_child (GTK_BIN (proxy)));
- widget = GTK_WIDGET (gtk_container_get_children (container)->data);
+ GtkContainer *container;
+ GList *children;
+
+ container = GTK_CONTAINER (gtk_bin_get_child (GTK_BIN (proxy)));
+ children = gtk_container_get_children (container);
+ widget = GTK_WIDGET (children->data);
+ g_list_free (children);
}
else if (GTK_IS_TOOL_BUTTON (proxy))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]