[gnumeric] sheet duplicate: fix leaks.



commit d3137bc04f960cc835e473f073605501446f9ad5
Author: Morten Welinder <terra gnome org>
Date:   Mon May 3 10:04:15 2010 -0400

    sheet duplicate: fix leaks.

 ChangeLog   |    4 ++--
 src/sheet.c |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e8bb086..146ee84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,8 @@
 2010-05-03  Morten Welinder  <terra gnome org>
 
 	* src/sheet.c (cb_sheet_cell_copy): Use gnm_cell_assign_value, not
-	gnm_cell_set_value, for non-corner array cells.  Fixes part of
-	#617469.  Copy the value!  Fixes part of #617469.
+	gnm_cell_set_value, for non-corner array cells.  Copy the value for same.
+	Don't leak cells.  Fixes most of #617469.
 
 2010-05-02  Morten Welinder  <terra gnome org>
 
diff --git a/src/sheet.c b/src/sheet.c
index f547641..8ca6786 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -5424,6 +5424,8 @@ cb_sheet_cell_copy (gpointer unused, gpointer key, gpointer new_sheet_param)
 						cell->pos.row + j);
 					gnm_cell_assign_value (out, value_dup (in->value));
 				}
+	} else if (cell->base.texpr && gnm_expr_top_is_array_elem (cell->base.texpr, NULL, NULL)) {
+		/* Not a corner -- ignore.  */
 	} else {
 		GnmCell *new_cell = sheet_cell_create (dst, cell->pos.col, cell->pos.row);
 		GnmValue *value = value_dup (cell->value);



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