base-modem: use g_steal_pointer() during dispose
g_steal_pointer() sets the original location to NULL already, so it's very handy.
This commit is contained in:
@@ -1663,19 +1663,16 @@ dispose (GObject *object)
|
|||||||
|
|
||||||
g_clear_object (&self->priv->primary);
|
g_clear_object (&self->priv->primary);
|
||||||
g_clear_object (&self->priv->secondary);
|
g_clear_object (&self->priv->secondary);
|
||||||
g_list_free_full (self->priv->data, g_object_unref);
|
g_list_free_full (g_steal_pointer (&self->priv->data), g_object_unref);
|
||||||
self->priv->data = NULL;
|
|
||||||
g_clear_object (&self->priv->qcdm);
|
g_clear_object (&self->priv->qcdm);
|
||||||
g_clear_object (&self->priv->gps_control);
|
g_clear_object (&self->priv->gps_control);
|
||||||
g_clear_object (&self->priv->gps);
|
g_clear_object (&self->priv->gps);
|
||||||
g_clear_object (&self->priv->audio);
|
g_clear_object (&self->priv->audio);
|
||||||
#if defined WITH_QMI
|
#if defined WITH_QMI
|
||||||
g_list_free_full (self->priv->qmi, g_object_unref);
|
g_list_free_full (g_steal_pointer (&self->priv->qmi), g_object_unref);
|
||||||
self->priv->qmi = NULL;
|
|
||||||
#endif
|
#endif
|
||||||
#if defined WITH_MBIM
|
#if defined WITH_MBIM
|
||||||
g_list_free_full (self->priv->mbim, g_object_unref);
|
g_list_free_full (g_steal_pointer (&self->priv->mbim), g_object_unref);
|
||||||
self->priv->mbim = NULL;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
teardown_ports_table (self);
|
teardown_ports_table (self);
|
||||||
|
Reference in New Issue
Block a user