Diff between df77cece961f8eaf229ac5b6d22837b75c9bbe0a and e39fc90979ad3c6e1ec5fdc3e96e714fc2004905

Changed Files

File Additions Deletions Status
plugins/service.c +2 -3 modified

Full Patch

diff --git a/plugins/service.c b/plugins/service.c
index 9bb8882..e02a673 100644
--- a/plugins/service.c
+++ b/plugins/service.c
@@ -536,17 +536,16 @@ static void auth_cb(DBusError *derr, void *user_data)
 		error("Access denied: %s", derr->message);
 
 		reply = btd_error_not_authorized(auth->msg);
-		dbus_message_unref(auth->msg);
 		g_dbus_send_message(conn, reply);
 		goto done;
 	}
 
-	g_dbus_send_reply(conn, auth->msg,
-			DBUS_TYPE_INVALID);
+	g_dbus_send_reply(conn, auth->msg, DBUS_TYPE_INVALID);
 
 done:
 	serv_adapter->pending_list = g_slist_remove(serv_adapter->pending_list,
 									auth);
+	dbus_message_unref(auth->msg);
 	g_free(auth);
 
 	auth = next_pending(serv_adapter);