mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02:00
device-ethernet: add finalize() method
This commit is contained in:
parent
ff2b655691
commit
59c0b7258c
1 changed files with 18 additions and 8 deletions
|
|
@ -1677,14 +1677,6 @@ dispose (GObject *object)
|
||||||
NMDeviceEthernet *self = NM_DEVICE_ETHERNET (object);
|
NMDeviceEthernet *self = NM_DEVICE_ETHERNET (object);
|
||||||
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
|
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
|
||||||
|
|
||||||
g_clear_object (&priv->supplicant.mgr);
|
|
||||||
g_free (priv->subchan1);
|
|
||||||
g_free (priv->subchan2);
|
|
||||||
g_free (priv->subchan3);
|
|
||||||
g_free (priv->subchannels);
|
|
||||||
g_free (priv->s390_nettype);
|
|
||||||
g_hash_table_destroy (priv->s390_options);
|
|
||||||
|
|
||||||
if (priv->pppoe_wait_id) {
|
if (priv->pppoe_wait_id) {
|
||||||
g_source_remove (priv->pppoe_wait_id);
|
g_source_remove (priv->pppoe_wait_id);
|
||||||
priv->pppoe_wait_id = 0;
|
priv->pppoe_wait_id = 0;
|
||||||
|
|
@ -1696,6 +1688,23 @@ dispose (GObject *object)
|
||||||
G_OBJECT_CLASS (nm_device_ethernet_parent_class)->dispose (object);
|
G_OBJECT_CLASS (nm_device_ethernet_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
finalize (GObject *object)
|
||||||
|
{
|
||||||
|
NMDeviceEthernet *self = NM_DEVICE_ETHERNET (object);
|
||||||
|
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
|
||||||
|
|
||||||
|
g_clear_object (&priv->supplicant.mgr);
|
||||||
|
g_free (priv->subchan1);
|
||||||
|
g_free (priv->subchan2);
|
||||||
|
g_free (priv->subchan3);
|
||||||
|
g_free (priv->subchannels);
|
||||||
|
g_free (priv->s390_nettype);
|
||||||
|
g_hash_table_destroy (priv->s390_options);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (nm_device_ethernet_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
get_property (GObject *object, guint prop_id,
|
get_property (GObject *object, guint prop_id,
|
||||||
GValue *value, GParamSpec *pspec)
|
GValue *value, GParamSpec *pspec)
|
||||||
|
|
@ -1740,6 +1749,7 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *klass)
|
||||||
/* virtual methods */
|
/* virtual methods */
|
||||||
object_class->constructor = constructor;
|
object_class->constructor = constructor;
|
||||||
object_class->dispose = dispose;
|
object_class->dispose = dispose;
|
||||||
|
object_class->finalize = finalize;
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue