[gtksourceview] gutterrenderermarks: free mark slist in query-tooltip
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] gutterrenderermarks: free mark slist in query-tooltip
- Date: Tue, 19 Feb 2019 20:09:34 +0000 (UTC)
commit 99dabb4d44f481c7077c7c51ac6acb6b7866718e
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 19 11:59:28 2019 -0800
gutterrenderermarks: free mark slist in query-tooltip
After querying the marks, the allocated list used to collect this must
be freed.
Related to #39
gtksourceview/gtksourcegutterrenderermarks.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gtksourceview/gtksourcegutterrenderermarks.c b/gtksourceview/gtksourcegutterrenderermarks.c
index 8978b313..8fdcb6df 100644
--- a/gtksourceview/gtksourcegutterrenderermarks.c
+++ b/gtksourceview/gtksourcegutterrenderermarks.c
@@ -336,6 +336,7 @@ gutter_renderer_query_tooltip (GtkSourceGutterRenderer *renderer,
GSList *marks;
GtkSourceView *view;
GtkSourceBuffer *buffer;
+ gboolean ret;
view = GTK_SOURCE_VIEW (gtk_source_gutter_renderer_get_view (renderer));
buffer = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
@@ -352,7 +353,11 @@ gutter_renderer_query_tooltip (GtkSourceGutterRenderer *renderer,
marks = g_slist_reverse (marks);
- return set_tooltip_widget_from_marks (view, tooltip, marks);
+ ret = set_tooltip_widget_from_marks (view, tooltip, marks);
+
+ g_slist_free (marks);
+
+ return ret;
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]