info: Use g_clear_* in finalize()
This commit is contained in:
parent
f2b1829db3
commit
c395e9ac23
1 changed files with 4 additions and 22 deletions
|
@ -535,32 +535,14 @@ cc_info_panel_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
CcInfoPanelPrivate *priv = CC_INFO_PANEL (object)->priv;
|
CcInfoPanelPrivate *priv = CC_INFO_PANEL (object)->priv;
|
||||||
|
|
||||||
if (priv->cancellable != NULL)
|
g_clear_pointer (&priv->cancellable, g_cancellable_cancel);
|
||||||
{
|
|
||||||
g_cancellable_cancel (priv->cancellable);
|
|
||||||
priv->cancellable = NULL;
|
|
||||||
}
|
|
||||||
g_free (priv->gnome_version);
|
g_free (priv->gnome_version);
|
||||||
g_free (priv->gnome_date);
|
g_free (priv->gnome_date);
|
||||||
g_free (priv->gnome_distributor);
|
g_free (priv->gnome_distributor);
|
||||||
|
|
||||||
if (priv->hostnamed_proxy != NULL)
|
g_clear_object (&priv->hostnamed_proxy);
|
||||||
{
|
g_clear_object (&priv->media_settings);
|
||||||
g_object_unref (priv->hostnamed_proxy);
|
g_clear_object (&priv->session_settings);
|
||||||
priv->hostnamed_proxy = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (priv->media_settings != NULL)
|
|
||||||
{
|
|
||||||
g_object_unref (priv->media_settings);
|
|
||||||
priv->media_settings = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (priv->session_settings != NULL)
|
|
||||||
{
|
|
||||||
g_object_unref (priv->session_settings);
|
|
||||||
priv->session_settings = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (cc_info_panel_parent_class)->finalize (object);
|
G_OBJECT_CLASS (cc_info_panel_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue