core: reset GList pointers to NULL when necessary

When calling g_list_free_full() to free a GList in dispose(), it is
necessary to reset the GList pointer to NULL as dispose() may be called
more than once.
This commit is contained in:
Ben Chan
2017-03-28 23:23:14 -07:00
committed by Aleksander Morgado
parent 78e6ba5688
commit 27e4c74c60
3 changed files with 4 additions and 0 deletions

View File

@@ -647,7 +647,9 @@ dispose (GObject *object)
g_clear_object (&(self->priv->plugin));
g_list_free_full (self->priv->port_probes, g_object_unref);
self->priv->port_probes = NULL;
g_list_free_full (self->priv->ignored_port_probes, g_object_unref);
self->priv->ignored_port_probes = NULL;
clear_modem (self);