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



commit 020f2979ca980c747d3efac91737ce4fa57bec94
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]