[gnumeric] ODF: plug leak.



commit 9a52d30c0fddca5fbc2481b1ae0effb377f5daf6
Author: Morten Welinder <terra gnome org>
Date:   Thu Nov 3 10:32:38 2011 -0400

    ODF: plug leak.

 plugins/openoffice/ChangeLog         |    5 +++++
 plugins/openoffice/openoffice-read.c |    7 +++----
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index e4f4542..a7f0553 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-03  Morten Welinder  <terra gnome org>
+
+	* openoffice-read.c (oo_chart_wall): Plug leak.
+	(oo_legend): Plug leak.
+
 2011-11-01  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* openoffice-read.c (oo_add_text_to_cell): check for NULL format
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 1d71f20..5630529 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -8204,7 +8204,7 @@ oo_legend (GsfXMLIn *xin, xmlChar const **attrs)
 		else if (oo_attr_enum (xin, attrs, OO_NS_CHART, "legend-align", alignments, &tmp))
 			align = tmp;
 		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_CHART, "style-name"))
-			style_name = g_strdup (CXML2C (attrs[1]));
+			style_name = CXML2C (attrs[1]);
 
 	legend = gog_object_add_by_name ((GogObject *)state->chart.chart, "Legend", NULL);
 	state->chart.legend = legend;
@@ -8222,7 +8222,6 @@ oo_legend (GsfXMLIn *xin, xmlChar const **attrs)
 			}
 		}
 	}
-
 }
 
 static void
@@ -8254,11 +8253,11 @@ oo_chart_wall (GsfXMLIn *xin, xmlChar const **attrs)
 {
 	OOParseState *state = (OOParseState *)xin->user_state;
 	GogObject *backplane;
-	gchar *style_name = NULL;
+	gchar const *style_name = NULL;
 
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
 		if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_CHART, "style-name"))
-			style_name = g_strdup (CXML2C (attrs[1]));
+			style_name = CXML2C (attrs[1]);
 
 	backplane = gog_object_add_by_name (GOG_OBJECT (state->chart.chart), "Backplane", NULL);
 



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