[goffice] Fix a double free issue



commit 330947e439c2f2653093832800dfd3288b6fa994
Author: Jean Brefort <jean brefort normalesup org>
Date:   Mon Jun 1 18:54:09 2015 +0200

    Fix a double free issue

 ChangeLog                          |    5 +++++
 goffice/graph/gog-axis-color-map.c |    4 +---
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ec6c5ab..1f406fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-01  Jean Brefort  <jean brefort normalesup org>
+
+       * goffice/graph/gog-axis-color-map.c (gog_axis_color_map_prep_sax): don't
+       free the xml doc twice.
+
 2015-05-31  Morten Welinder  <terra gnome org>
 
        * goffice/utils/go-format.c (go_format_parse_number_new_1):
diff --git a/goffice/graph/gog-axis-color-map.c b/goffice/graph/gog-axis-color-map.c
index 2bf3908..2837fc9 100644
--- a/goffice/graph/gog-axis-color-map.c
+++ b/goffice/graph/gog-axis-color-map.c
@@ -389,10 +389,8 @@ gog_axis_color_map_prep_sax (GOPersist *gp, GsfXMLIn *xin, xmlChar const **attrs
        state->langs = g_get_language_names ();
        state->name_lang_score = G_MAXINT;
        state->color_stops = NULL;
-       if (!xml) {
+       if (!xml)
                xml = gsf_xml_in_doc_new (color_map_dtd, NULL);
-               go_xml_in_doc_dispose_on_exit (&xml);
-       }
        gsf_xml_in_push_state (xin, xml, state, (GsfXMLInExtDtor) parse_done_cb, attrs);
 }
 


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