[Xfce4-commits] <garcon:master> Fix wrong unref in GarconMenuItem.

Nick Schermer nick at xfce.org
Mon Aug 17 18:16:12 CEST 2009


Updating branch refs/heads/master
         to be6aa1b24fd35d3cd001b3543b2939205f3829d4 (commit)
       from ad5df5a87f08a8ca06afba2a277c85f5d499a8bc (commit)

commit be6aa1b24fd35d3cd001b3543b2939205f3829d4
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Aug 17 17:59:12 2009 +0200

    Fix wrong unref in GarconMenuItem.

 garcon/garcon-menu-item.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/garcon/garcon-menu-item.c b/garcon/garcon-menu-item.c
index 434e5c7..b7a42b4 100644
--- a/garcon/garcon-menu-item.c
+++ b/garcon/garcon-menu-item.c
@@ -551,7 +551,7 @@ garcon_menu_item_new (GFile *file)
 
   /* Load the contents of the file */
   if (!g_file_load_contents (file, NULL, &contents, &length, NULL, NULL))
-    goto error;
+    return NULL;
 
   /* Open the keyfile */
   rc = g_key_file_new ();
@@ -629,10 +629,6 @@ garcon_menu_item_new (GFile *file)
   g_free (path);
 
 error:
-
-  /* Release gfile */
-  g_object_unref (G_OBJECT (file));
-
   /* Close file handle */
   if (G_LIKELY (rc != NULL))
     g_key_file_free (rc);



More information about the Xfce4-commits mailing list