[gedit] Plug small leak on error path
- From: Paolo Borelli <pborelli src gnome org>
- To: svn-commits-list gnome org
- Subject: [gedit] Plug small leak on error path
- Date: Sat, 25 Jul 2009 14:18:12 +0000 (UTC)
commit 55719c2e76729131cf931ad71878259339e09cf8
Author: Paolo Borelli <porelli gnome org>
Date: Sat Jul 25 16:18:39 2009 +0200
Plug small leak on error path
gedit/gedit-utils.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-utils.c b/gedit/gedit-utils.c
index 15f5b8d..7504511 100644
--- a/gedit/gedit-utils.c
+++ b/gedit/gedit-utils.c
@@ -1123,14 +1123,18 @@ gedit_utils_get_ui_objects (const gchar *filename,
builder = gtk_builder_new ();
if (root_objects != NULL)
+ {
gtk_builder_add_objects_from_file (builder,
filename,
root_objects,
&error);
+ }
else
+ {
gtk_builder_add_from_file (builder,
filename,
&error);
+ }
if (error != NULL)
{
@@ -1139,6 +1143,7 @@ gedit_utils_get_ui_objects (const gchar *filename,
error->message);
g_error_free (error);
g_free (filename_markup);
+ g_object_unref (builder);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]