[pango/serializer-rewrite: 2/2] jsonparser: Plug a memory leak




commit 2e1a0a4b255cb1a40babbd6e72055bf06f85b1a9
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Dec 2 20:17:41 2021 -0500

    jsonparser: Plug a memory leak

 pango/json/gtkjsonparser.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/pango/json/gtkjsonparser.c b/pango/json/gtkjsonparser.c
index fd9ba519..91048fec 100644
--- a/pango/json/gtkjsonparser.c
+++ b/pango/json/gtkjsonparser.c
@@ -702,6 +702,8 @@ gtk_json_parser_free (GtkJsonParser *self)
   if (self == NULL)
     return;
 
+  g_clear_error (&self->error);
+
   g_bytes_unref (self->bytes);
 
   if (self->blocks != self->blocks_preallocated)


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