[goffice] Memory leak.



commit e1a99f50f17fb0eb4bb8466e063925e00713308d
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sun Feb 21 15:54:12 2010 +0100

    Memory leak.

 ChangeLog                 |    4 ++++
 goffice/gtk/goffice-gtk.c |    3 ++-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index aa9a90e..dc844cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-21  Jean Brefort  <jean brefort normalesup org>
+
+	* goffice/gtk/goffice-gtk.c (go_gtk_builder_new): fixed a memory leak.
+
 2010-02-19  Jean Brefort  <jean brefort normalesup org>
 
 	* goffice/graph/gog-object.c (gog_object_parent_finalized),
diff --git a/goffice/gtk/goffice-gtk.c b/goffice/gtk/goffice-gtk.c
index 55704ed..5d993cc 100644
--- a/goffice/gtk/goffice-gtk.c
+++ b/goffice/gtk/goffice-gtk.c
@@ -140,7 +140,8 @@ go_gtk_builder_new (char const *uifile,
 			msg = g_strdup_printf (_("Unable to open file '%s'"), f);
 		go_cmd_context_error_system (gcc, msg);
 		g_free (msg);
-	}
+	} else if (error)
+		g_error_free (error);
 	g_free (f);
 
 	return gui;



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