[gnumeric] xls: fix double free.



commit 6d7a40e9be470389b9096d84ee8f9226b2f97972
Author: Morten Welinder <terra gnome org>
Date:   Wed Feb 18 17:58:56 2015 -0500

    xls: fix double free.
    
    One of the previous leak fixes also introduced a double free.

 plugins/excel/ChangeLog        |    1 +
 plugins/excel/ms-chart.c       |    2 ++
 plugins/excel/ms-excel-write.c |    2 --
 3 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index a86ab17..5561741 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,6 +1,7 @@
 2015-02-17  Morten Welinder  <terra gnome org>
 
        * ms-excel-write.c (excel_collect_validations): Plug leak.
+       (excel_write_DV): Don't free ranges here.
 
        * xlsx-write-drawing.c (xlsx_go_style_has_font): Simplify now that
        we have a sane auto_font.
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index 4012248..3855e7b 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -5351,6 +5351,8 @@ chart_write_axis_sets (XLChartWriteState *s, GSList *sets)
                                        "pos-str", &str, "invert-axis", &y_inverted, NULL);
                                y_cross_at_max ^= y_inverted;
                                y_force_catserrange = gog_axis_is_discrete (s->primary_axis[GOG_AXIS_Y]);
+                               /* What did we want str for?  */
+                               g_free (str);
                        }
 
                        /* BIFF_CHART_pos, optional we use auto positioning */
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index ecd3963..efb20ad 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -1579,8 +1579,6 @@ excel_write_DV (XLValInputPair const *vip, gpointer dummy, ExcelWriteSheet *eshe
                ms_biff_put_var_write (bp, data, 8);
        }
        ms_biff_put_commit (bp);
-
-       g_slist_free (vip->ranges);
 }
 
 static void


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