Network: fix a refcounting bug with vpn settings
nm_connection_get_setting_by_name() does not return a reference, so we have to get one ourselves.
This commit is contained in:
parent
eeb6193248
commit
ea5f76247d
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ net_vpn_set_connection (NetVpn *vpn, NMConnection *connection)
|
|||
G_CALLBACK (connection_state_changed_cb),
|
||||
vpn);
|
||||
}
|
||||
priv->setting = NM_SETTING_VPN (nm_connection_get_setting_by_name (connection, "vpn"));
|
||||
priv->setting = NM_SETTING_VPN (g_object_ref (nm_connection_get_setting_by_name (connection, "vpn")));
|
||||
}
|
||||
|
||||
NMConnection *
|
||||
|
|
Loading…
Add table
Reference in a new issue