network: Simplify object destruction
This commit is contained in:
parent
c7800dd22f
commit
b4ac30b51e
1 changed files with 1 additions and 2 deletions
|
@ -268,8 +268,7 @@ net_device_finalize (GObject *object)
|
|||
g_signal_handler_disconnect (priv->nm_device,
|
||||
priv->changed_id);
|
||||
}
|
||||
if (priv->nm_device != NULL)
|
||||
g_object_unref (priv->nm_device);
|
||||
g_clear_object (&priv->nm_device);
|
||||
|
||||
G_OBJECT_CLASS (net_device_parent_class)->finalize (object);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue