device: clear queued sriov operation on dispose

When dispose() is called, there can't be any pending operation because
they keep a reference to the device. Instead, there can be a a queued
operation not yet executed. Destroy it.

(cherry picked from commit 6fcb077a98)
This commit is contained in:
Beniamino Galvani 2020-06-25 17:40:48 +02:00
parent ed849eadc1
commit 01997b2550

View file

@ -17892,6 +17892,12 @@ dispose (GObject *object)
nm_clear_g_source (&priv->concheck_x[0].p_cur_id);
nm_clear_g_source (&priv->concheck_x[1].p_cur_id);
nm_assert (!priv->sriov.pending);
if (priv->sriov.next) {
nm_g_slice_free (priv->sriov.next);
priv->sriov.next = NULL;
}
G_OBJECT_CLASS (nm_device_parent_class)->dispose (object);
if (nm_clear_g_source (&priv->queued_state.id)) {