[gnumeric] workbook: free ->sheet_local_functions too.



commit bb0a199b1d2107c4ef83a91c2c5a459963ae1e6c
Author: Morten Welinder <terra gnome org>
Date:   Fri Nov 27 19:14:08 2009 -0500

    workbook: free ->sheet_local_functions too.

 ChangeLog      |    2 ++
 src/workbook.c |    5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 59a3179..6e01b3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2009-11-27  Morten Welinder  <terra gnome org>
 
+	* src/workbook.c (workbook_finalize): Plug leak.
+
 	* src/print.c (gnm_print_sheet): Plug leak.
 
 2009-11-26  Jean Brefort  <jean brefort normalesup org>
diff --git a/src/workbook.c b/src/workbook.c
index 9b1b06e..825e3d0 100644
--- a/src/workbook.c
+++ b/src/workbook.c
@@ -144,6 +144,11 @@ workbook_finalize (GObject *obj)
 	/* Remove ourselves from the list of workbooks.  */
 	gnm_app_workbook_list_remove (wb);
 
+	if (wb->sheet_local_functions) {
+		g_hash_table_destroy (wb->sheet_local_functions);
+		wb->sheet_local_functions = NULL;
+	}
+
 	/* Now do deletions that will put this workbook into a weird
 	   state.  Careful here.  */
 	g_hash_table_destroy (wb->sheet_hash_private);



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