[gnumeric] ods: leak fix.



commit 1823db0321848f9048b90b171c4d58bf2eac709f
Author: Morten Welinder <terra gnome org>
Date:   Mon Mar 26 15:55:13 2012 -0400

    ods: leak fix.
    
    Nit picking leak fix.  If someone supplied arguments to TRUE() or
    FALSE() we would leak them.

 plugins/openoffice/openoffice-read.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 4d8f148..0f80032 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -10311,16 +10311,16 @@ odf_func_chisqdist_handler (G_GNUC_UNUSED GnmConventions const *convs, Workbook
 
 static GnmExpr const *
 odf_func_true_handler (G_GNUC_UNUSED GnmConventions const *convs,
-		       G_GNUC_UNUSED Workbook *scope, G_GNUC_UNUSED GnmExprList *args)
+		       G_GNUC_UNUSED Workbook *scope, GnmExprList *args)
 {
-	return gnm_expr_new_constant (value_new_bool (TRUE));
+	return args ? NULL : gnm_expr_new_constant (value_new_bool (TRUE));
 }
 
 static GnmExpr const *
 odf_func_false_handler (G_GNUC_UNUSED GnmConventions const *convs,
-			G_GNUC_UNUSED Workbook *scope, G_GNUC_UNUSED GnmExprList *args)
+			G_GNUC_UNUSED Workbook *scope, GnmExprList *args)
 {
-	return gnm_expr_new_constant (value_new_bool (FALSE));
+	return args ? NULL : gnm_expr_new_constant (value_new_bool (FALSE));
 }
 
 static GnmExpr const *



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