[libgsf] xml: plug leaks.



commit 3424870adae6dc825d57033f0e02d14204e1854c
Author: Morten Welinder <terra gnome org>
Date:   Fri Jun 21 12:42:02 2013 -0400

    xml: plug leaks.
    
    These leaks only occur when a malformed document is handled.

 ChangeLog        |    4 ++++
 gsf/gsf-libxml.c |    9 +++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3f712d0..426f014 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-06-21  Morten Welinder  <terra gnome org>
+
+       * gsf/gsf-libxml.c (gsf_xml_in_end_document): Plug leak.
+
 2013-06-19  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * gsf/gsf-timestamp.c (gsf_timestamp_load_from_string): perfrom
diff --git a/gsf/gsf-libxml.c b/gsf/gsf-libxml.c
index f5936c2..7980361 100644
--- a/gsf/gsf-libxml.c
+++ b/gsf/gsf-libxml.c
@@ -951,6 +951,15 @@ gsf_xml_in_end_document (GsfXMLInInternal *state)
                g_hash_table_destroy (state->ns_unknowns);
                state->ns_unknowns = NULL;
 
+               g_slist_free (state->extension_stack);
+               state->extension_stack = NULL;
+
+               g_slist_free (state->pub.node_stack);
+               state->pub.node_stack = NULL;
+
+               g_slist_free (state->ns_stack);
+               state->ns_stack = NULL;
+
                state->initialized = FALSE;
 
                if (state->pub.node != &state->pub.doc->root_node->pub) {


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