[gtk+] Fix a few memory leaks



commit 81c12493ae632f0bd28066ac787316a73a007150
Author: Timm Bäder <mail baedert org>
Date:   Thu Oct 20 21:12:36 2016 +0200

    Fix a few memory leaks

 gsk/gskrendernode.c       |    1 +
 gsk/gskshaderbuilder.c    |    2 ++
 gtk/gtkshortcutssection.c |    1 +
 3 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gsk/gskrendernode.c b/gsk/gskrendernode.c
index 9006221..17f759a 100644
--- a/gsk/gskrendernode.c
+++ b/gsk/gskrendernode.c
@@ -147,6 +147,7 @@ gsk_render_node_finalize (GskRenderNode *self)
   self->is_mutable = TRUE;
 
   g_clear_pointer (&self->surface, cairo_surface_destroy);
+  g_clear_pointer (&self->name, g_free);
 
   gsk_render_node_iter_init (&iter, self);
   while (gsk_render_node_iter_next (&iter, NULL))
diff --git a/gsk/gskshaderbuilder.c b/gsk/gskshaderbuilder.c
index f5a66a9..65c779a 100644
--- a/gsk/gskshaderbuilder.c
+++ b/gsk/gskshaderbuilder.c
@@ -65,6 +65,8 @@ gsk_shader_builder_finalize (GObject *gobject)
   GskShaderBuilder *self = GSK_SHADER_BUILDER (gobject);
 
   g_free (self->resource_base_path);
+  g_free (self->vertex_preamble);
+  g_free (self->fragment_preamble);
 
   g_clear_pointer (&self->defines, g_ptr_array_unref);
   g_clear_pointer (&self->uniforms, g_ptr_array_unref);
diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c
index 32afb1e..6ffca92 100644
--- a/gtk/gtkshortcutssection.c
+++ b/gtk/gtkshortcutssection.c
@@ -239,6 +239,7 @@ gtk_shortcuts_section_finalize (GObject *object)
 
   g_clear_pointer (&self->name, g_free);
   g_clear_pointer (&self->title, g_free);
+  g_clear_pointer (&self->view_name, g_free);
   g_clear_object (&self->pan_gesture);
 
   G_OBJECT_CLASS (gtk_shortcuts_section_parent_class)->finalize (object);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]