[gnumeric] ssconvert: plug leak.



commit 4b271e15222b78abf1199f318b6d764105216a67
Author: Morten Welinder <terra gnome org>
Date:   Thu Dec 10 20:36:39 2020 -0500

    ssconvert: plug leak.
    
    When setting a cell failed we leaked the whole workbook.

 NEWS            | 1 +
 src/ssconvert.c | 2 ++
 2 files changed, 3 insertions(+)
---
diff --git a/NEWS b/NEWS
index b77701e03..8ef828050 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Morten:
        * Don't trim spaces for csv files as per rfc 4180.  [#528]
        * Fix cvs separator guessing problem with quotes.  [#537]
        * Improve handling of expressions in csv files.
+       * Plug ssconvert leak.  [#546]
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.48
diff --git a/src/ssconvert.c b/src/ssconvert.c
index 4940ea15a..3298ae97b 100644
--- a/src/ssconvert.c
+++ b/src/ssconvert.c
@@ -1332,6 +1332,8 @@ convert (char const *inarg, char const *outarg, char const *mergeargs[],
        }
 
  out:
+       if (wbv)
+               wb = wb_view_get_workbook (wbv);
        if (wb)
                g_object_unref (wb);
        if (io_context)


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