summaryrefslogtreecommitdiff
path: root/gtk/gtkgesture.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-06-28 20:15:12 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-06-28 20:15:12 -0400
commit70bfb02fde2a9c4a021431a4d467cf26a869d999 (patch)
treec0b75e093cc5fe87ba40e79aa25304c83f73a03a /gtk/gtkgesture.c
parent18126121a453c211b8ec79cf98336be61ec02475 (diff)
downloadgtk+-70bfb02fde2a9c4a021431a4d467cf26a869d999.tar.gz
GtkGesture: Don't leak the group link
Found in a valgrind log.
Diffstat (limited to 'gtk/gtkgesture.c')
-rw-r--r--gtk/gtkgesture.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkgesture.c b/gtk/gtkgesture.c
index dae458ddbb..6829a56aa6 100644
--- a/gtk/gtkgesture.c
+++ b/gtk/gtkgesture.c
@@ -208,7 +208,11 @@ gtk_gesture_set_property (GObject *object,
static void
gtk_gesture_finalize (GObject *object)
{
- GtkGesturePrivate *priv = gtk_gesture_get_instance_private (GTK_GESTURE (object));
+ GtkGesture *gesture = GTK_GESTURE (object);
+ GtkGesturePrivate *priv = gtk_gesture_get_instance_private (gesture);
+
+ gtk_gesture_ungroup (gesture);
+ g_list_free (priv->group_link);
g_hash_table_destroy (priv->points);