mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-12 02:10:19 +01:00
libnm-glib: don't try to free unset GValues when disconnecting VPNs
IPv6-capable plugins will fill these in, but old IPv4-only won't, so don't try to free the GValues when they aren't set.
This commit is contained in:
parent
26b833cd53
commit
202b693bd8
1 changed files with 8 additions and 4 deletions
|
|
@ -754,10 +754,14 @@ finalize (GObject *object)
|
|||
nm_vpn_plugin_set_connection (plugin, NULL);
|
||||
g_free (priv->dbus_service_name);
|
||||
|
||||
g_value_unset (&priv->banner);
|
||||
g_value_unset (&priv->tundev);
|
||||
g_value_unset (&priv->gateway);
|
||||
g_value_unset (&priv->mtu);
|
||||
if (G_IS_VALUE (&priv->banner))
|
||||
g_value_unset (&priv->banner);
|
||||
if (G_IS_VALUE (&priv->tundev))
|
||||
g_value_unset (&priv->tundev);
|
||||
if (G_IS_VALUE (&priv->gateway))
|
||||
g_value_unset (&priv->gateway);
|
||||
if (G_IS_VALUE (&priv->mtu))
|
||||
g_value_unset (&priv->mtu);
|
||||
|
||||
G_OBJECT_CLASS (nm_vpn_plugin_parent_class)->finalize (object);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue