[gnumeric] .gnumeric: plug leak.



commit 3b2a17118c7c9b7f35f94c6117d28d7bc2b4b516
Author: Morten Welinder <terra gnome org>
Date:   Fri Oct 24 18:28:36 2014 -0400

    .gnumeric: plug leak.

 ChangeLog           |    4 ++++
 NEWS                |    3 +++
 src/xml-sax-write.c |    5 ++---
 3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 09e042b..1afc80e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-10-24  Morten Welinder  <terra gnome org>
+
+       * src/xml-sax-write.c (xml_write_selection_info): Plug leak.
+
 2014-10-21  Morten Welinder  <terra gnome org>
 
        * src/mstyle.c (gnm_style_dump_color): Also dump auto flag.
diff --git a/NEWS b/NEWS
index 35120d9..6832446 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 Gnumeric 1.12.19
 
+Morten:
+       * Plug leak.
+
 --------------------------------------------------------------------------
 Gnumeric 1.12.18
 
diff --git a/src/xml-sax-write.c b/src/xml-sax-write.c
index 93dec42..50ec4fa 100644
--- a/src/xml-sax-write.c
+++ b/src/xml-sax-write.c
@@ -812,9 +812,8 @@ xml_write_selection_info (GnmOutputXML *state)
        gsf_xml_out_add_int (state->output, "CursorRow", sv->edit_pos_real.row);
 
        /* Insert the selections in REVERSE order */
-       copy = g_slist_copy (sv->selections);
-       ptr = g_slist_reverse (copy);
-       for (; ptr != NULL ; ptr = ptr->next) {
+       copy = g_slist_reverse (g_slist_copy (sv->selections));
+       for (ptr = copy; ptr; ptr = ptr->next) {
                GnmRange const *r = ptr->data;
                gsf_xml_out_start_element (state->output, GNM "Selection");
                xml_out_add_range (state->output, r);


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