[gconf] ensure_database: don't free the reply til we've finished with its args



commit 408fa0ee93aa270618f239e5505220dc10bd04a4
Author: Simon McVittie <simon mcvittie collabora co uk>
Date:   Tue May 31 10:49:12 2011 +0100

    ensure_database: don't free the reply til we've finished with its args
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=654497
    Bug-NB: NB#261472
    Reviewed-by: Cosimo Alfarano <cosimo alfarano collabora co uk>
    Reviewed-by: Ross Burton <ross burtonini com>

 gconf/gconf-dbus.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gconf/gconf-dbus.c b/gconf/gconf-dbus.c
index 8071e94..63655e1 100644
--- a/gconf/gconf-dbus.c
+++ b/gconf/gconf-dbus.c
@@ -548,20 +548,20 @@ ensure_database (GConfEngine  *conf,
 			 DBUS_TYPE_STRING, &db,
 			 DBUS_TYPE_INVALID);
 
-  dbus_message_unref (reply);
-
   if (db == NULL)
     {
       if (err)
         *err = gconf_error_new (GCONF_ERROR_BAD_ADDRESS,
 				_("Server couldn't resolve the address `%s'"),
 				conf->persistent_address);
-      
+
+      dbus_message_unref (reply);
       return FALSE;
     }
 
   gconf_engine_set_database (conf, db);
 
+  dbus_message_unref (reply);
   return TRUE;
 }
 



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