[gnome-builder] xml-pack: don't leak TreeBuilderState structure



commit 081ea176e86dff8af39a6d4362649cdf6740ff89
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jan 12 17:39:39 2018 -0800

    xml-pack: don't leak TreeBuilderState structure

 src/plugins/xml-pack/ide-xml-tree-builder.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/xml-pack/ide-xml-tree-builder.c b/src/plugins/xml-pack/ide-xml-tree-builder.c
index c87e592c5..e80c264a6 100644
--- a/src/plugins/xml-pack/ide-xml-tree-builder.c
+++ b/src/plugins/xml-pack/ide-xml-tree-builder.c
@@ -41,7 +41,8 @@ struct _IdeXmlTreeBuilder
   IdeXmlValidator *validator;
 };
 
-typedef struct{
+typedef struct
+{
   GBytes         *content;
   GFile          *file;
   IdeXmlAnalysis *analysis;
@@ -54,6 +55,7 @@ tree_builder_state_free (TreeBuilderState *state)
   g_clear_pointer (&state->content, g_bytes_unref);
   g_clear_pointer (&state->analysis, ide_xml_analysis_unref);
   g_clear_object (&state->file);
+  g_slice_free (TreeBuilderState, state);
 }
 
 G_DEFINE_TYPE (IdeXmlTreeBuilder, ide_xml_tree_builder, IDE_TYPE_OBJECT)


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