diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2014-04-07 15:34:10 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2014-04-10 09:40:11 +0200 |
commit | 955735f47f6d632d7a9fd9a826ff268cfdbfa324 (patch) | |
tree | 17e6f7289b3111e00c06f2613e778dbf941b7901 | |
parent | 29e620c63eb221eedc008f814d9125c5131c8ed2 (diff) | |
download | NetworkManager-jk/rh1083196-con-match.tar.gz |
device-wired: add finalize() methodjk/rh1083196-con-match
-rw-r--r-- | src/devices/nm-device-ethernet.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c index 920d2553be..79e9086fcd 100644 --- a/src/devices/nm-device-ethernet.c +++ b/src/devices/nm-device-ethernet.c @@ -1677,14 +1677,6 @@ dispose (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); - if (priv->pppoe_wait_id) { g_source_remove (priv->pppoe_wait_id); priv->pppoe_wait_id = 0; @@ -1697,6 +1689,23 @@ dispose (GObject *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 get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { @@ -1740,6 +1749,7 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *klass) /* virtual methods */ object_class->constructor = constructor; object_class->dispose = dispose; + object_class->finalize = finalize; object_class->get_property = get_property; object_class->set_property = set_property; |