core: convert the DBus manager to a single-ref object
It's created very, very early and never needs to be unrefed by anything except the main() function.
This commit is contained in:

committed by
Dan Winship

parent
e3bd3278e9
commit
04cb58eacd
@@ -150,15 +150,11 @@ nm_auth_chain_new (DBusGMethodInvocation *context,
|
||||
{
|
||||
gulong sender_uid = G_MAXULONG;
|
||||
char *sender = NULL;
|
||||
NMDBusManager *dbus_mgr;
|
||||
NMAuthChain *chain = NULL;
|
||||
|
||||
g_return_val_if_fail (context != NULL, NULL);
|
||||
|
||||
dbus_mgr = nm_dbus_manager_get ();
|
||||
g_assert (dbus_mgr);
|
||||
|
||||
if (nm_dbus_manager_get_caller_info (dbus_mgr,
|
||||
if (nm_dbus_manager_get_caller_info (nm_dbus_manager_get (),
|
||||
context,
|
||||
&sender,
|
||||
&sender_uid)) {
|
||||
@@ -169,7 +165,6 @@ nm_auth_chain_new (DBusGMethodInvocation *context,
|
||||
*out_error_desc = "Unable to determine request UID and sender.";
|
||||
|
||||
g_free (sender);
|
||||
g_object_unref (dbus_mgr);
|
||||
return chain;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user