From 70bfb02fde2a9c4a021431a4d467cf26a869d999 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 28 Jun 2014 20:15:12 -0400 Subject: [PATCH] GtkGesture: Don't leak the group link Found in a valgrind log. --- gtk/gtkgesture.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);