aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2009-09-03 03:19:22 +0800
committerXan Lopez <xan@gnome.org>2009-09-03 03:19:22 +0800
commit0094e74a6d97f3c553afb0916579480f1e11d3d4 (patch)
treec48c6960c8e96c3449599db1ab3f5a44c6bec7db /src
parent2836316f28b460a2b03c4ffb6c4991b6509f5f48 (diff)
downloadgsoc2013-epiphany-0094e74a6d97f3c553afb0916579480f1e11d3d4.tar
gsoc2013-epiphany-0094e74a6d97f3c553afb0916579480f1e11d3d4.tar.gz
gsoc2013-epiphany-0094e74a6d97f3c553afb0916579480f1e11d3d4.tar.bz2
gsoc2013-epiphany-0094e74a6d97f3c553afb0916579480f1e11d3d4.tar.lz
gsoc2013-epiphany-0094e74a6d97f3c553afb0916579480f1e11d3d4.tar.xz
gsoc2013-epiphany-0094e74a6d97f3c553afb0916579480f1e11d3d4.tar.zst
gsoc2013-epiphany-0094e74a6d97f3c553afb0916579480f1e11d3d4.zip
ephy-link-action.c: plug memory leak
Noticed by Dan Winship.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-link-action.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ephy-link-action.c b/src/ephy-link-action.c
index a5049c4ef..0447663ac 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))
{