[gnumeric] fix leak



commit 04258e2f08b1edbc03091a04ff9b577645ca4644
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Sat May 28 10:29:17 2011 -0600

    fix leak
    
    2011-05-28  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-write.c (odf_write_comment): fix leak

 plugins/openoffice/ChangeLog          |    4 ++++
 plugins/openoffice/openoffice-write.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index c5263d0..32e8cb8 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-28  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* openoffice-write.c (odf_write_comment): fix leak
+
 2011-05-27  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* openoffice-write.c (odf_write_comment): assume nothing
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 69f7d77..0ca026a 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -2514,7 +2514,7 @@ odf_write_comment (GnmOOExport *state, GnmComment const *cc)
 {
 	char *author = NULL;
 	char *text = NULL;
-	const PangoAttrList * markup = NULL;
+	PangoAttrList * markup = NULL;
 	gboolean pp = TRUE;
 
 	g_object_get (G_OBJECT (state->xml), "pretty-print", &pp, NULL);
@@ -2534,7 +2534,7 @@ odf_write_comment (GnmOOExport *state, GnmComment const *cc)
 		gsf_xml_out_start_element (state->xml, TEXT "p");
 		if (markup != NULL) {
 			odf_new_markup (state, markup, text);
-			/* Are we leaking the markup? */
+			pango_attr_list_unref (markup);
 		} else {
 			gboolean white_written = TRUE;
 			odf_add_chars (state, text, strlen (text), &white_written);



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