diff options
author | Thomas Haller <thaller@redhat.com> | 2015-08-25 18:41:08 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-08-25 18:53:39 +0200 |
commit | 803fc616fd9d1f9cf6e92c6e1530fef16fc0c0d9 (patch) | |
tree | 776c9a38da31f4cf9674967cef28ff6fe14ec908 /libnm | |
parent | 3afa894bfb4d45c20d0a33b7da8601ee149e278e (diff) | |
download | NetworkManager-803fc616fd9d1f9cf6e92c6e1530fef16fc0c0d9.tar.gz |
libnm: properly handle floating references in nm_vpn_service_plugin_set_ip6_config()
Diffstat (limited to 'libnm')
-rw-r--r-- | libnm/nm-vpn-plugin-old.c | 4 | ||||
-rw-r--r-- | libnm/nm-vpn-service-plugin.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c index 197bb4561a..f31daab033 100644 --- a/libnm/nm-vpn-plugin-old.c +++ b/libnm/nm-vpn-plugin-old.c @@ -380,9 +380,13 @@ nm_vpn_plugin_old_set_ip6_config (NMVpnPluginOld *plugin, g_return_if_fail (NM_IS_VPN_PLUGIN_OLD (plugin)); g_return_if_fail (ip6_config != NULL); + g_variant_ref_sink (ip6_config); + priv->got_ip6 = TRUE; g_signal_emit (plugin, signals[IP6_CONFIG], 0, ip6_config); + g_variant_unref (ip6_config); + if ( priv->has_ip4 == priv->got_ip4 && priv->has_ip6 == priv->got_ip6) nm_vpn_plugin_old_set_state (plugin, NM_VPN_SERVICE_STATE_STARTED); diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c index 2e15a542b7..d272d8c8dd 100644 --- a/libnm/nm-vpn-service-plugin.c +++ b/libnm/nm-vpn-service-plugin.c @@ -392,10 +392,14 @@ nm_vpn_service_plugin_set_ip6_config (NMVpnServicePlugin *plugin, g_return_if_fail (NM_IS_VPN_SERVICE_PLUGIN (plugin)); g_return_if_fail (ip6_config != NULL); + g_variant_ref_sink (ip6_config); + priv->got_ip6 = TRUE; g_signal_emit (plugin, signals[IP6_CONFIG], 0, ip6_config); g_signal_emit (priv->dbus_vpn_service_plugin, signals[IP6_CONFIG], 0, ip6_config); + g_variant_unref (ip6_config); + if ( priv->has_ip4 == priv->got_ip4 && priv->has_ip6 == priv->got_ip6) nm_vpn_service_plugin_set_state (plugin, NM_VPN_SERVICE_STATE_STARTED); |