[gnumeric] Plug leak in ODF import.



commit ce389f4ce98ede198224079735397f278e62d546
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Thu Apr 9 19:35:22 2015 -0600

     Plug leak in ODF import.
    
    2015-04-09  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-read.c (odf_validation_new_pair_expr): fix leak

 NEWS                                 |    1 +
 plugins/openoffice/ChangeLog         |    4 ++++
 plugins/openoffice/openoffice-read.c |    4 +++-
 3 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index d0a3a82..70a6f2d 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Andreas:
        * Simplify export of SEC and SECH to ODF. [#747211]
        * Harden ODF import against fuzzed files. [#747447][#747448]
        * Fix ODF import/export of unlinked checkboxes and radio buttons.
+       * Plug leak in ODF import.
 
 Jean:
        * Fix signal handling while running Python. [#744638]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 5c8876c..33e0536 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-09  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-read.c (odf_validation_new_pair_expr): fix leak
+
 2015-04-08  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-read.c (odf_complete_control_setup): setup value for
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index e923ca5..f98a1c4 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -2640,7 +2640,8 @@ odf_validation_new_pair_expr (GsfXMLIn *xin, odf_validation_t *val,
        }
        texpr_a = oo_expr_parse_str (xin, pair, &pp, flag, val->f_type);
 
-       if (texpr_b != NULL)
+       if (texpr_b != NULL) {
+               g_free (pair);
                return gnm_validation_new (val->style,
                                       val_type,
                                       val_op,
@@ -2651,6 +2652,7 @@ odf_validation_new_pair_expr (GsfXMLIn *xin, odf_validation_t *val,
                                       texpr_b,
                                       val->allow_blank,
                                       val->use_dropdown);
+       }
  pair_error:
        g_free (pair);
        return NULL;


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