[gvfs] obexftp: Fix error reporting on initialization



commit eef0374a45883d83087b8b5156c19c06f786da95
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Wed Aug 10 15:58:58 2011 +0200

    obexftp: Fix error reporting on initialization
    
    Found by Coverity Scan analysis

 daemon/gvfsbackendobexftp.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gvfsbackendobexftp.c b/daemon/gvfsbackendobexftp.c
index 214e40b..9630df8 100644
--- a/daemon/gvfsbackendobexftp.c
+++ b/daemon/gvfsbackendobexftp.c
@@ -507,7 +507,6 @@ g_vfs_backend_obexftp_init (GVfsBackendObexftp *backend)
   DBusConnection *conn;
   DBusGConnection *connection;
   DBusError error;
-  GError *err = NULL;
 
   /* Otherwise dbus-glib doesn't setup it value types */
   connection = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
@@ -519,7 +518,7 @@ g_vfs_backend_obexftp_init (GVfsBackendObexftp *backend)
   dbus_error_init (&error);
   conn = dbus_bus_get_private (DBUS_BUS_SESSION, &error);
   if (conn == NULL) {
-      g_printerr ("Connecting to session bus failed: %s\n", err->message);
+      g_printerr ("Connecting to session bus failed: %s\n", error.message);
       dbus_error_free (&error);
       return;
   }
@@ -527,8 +526,7 @@ g_vfs_backend_obexftp_init (GVfsBackendObexftp *backend)
 
   backend->connection = dbus_connection_get_g_connection (conn);
   if (backend->connection == NULL) {
-      g_printerr ("Connecting to session bus failed: %s\n", err->message);
-      g_error_free (err);
+      g_printerr ("Connecting to session bus failed\n");
       return;
   }
 



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