From 01997b255035ed0c38ecf8b16883d0634f3b8b41 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 25 Jun 2020 17:40:48 +0200 Subject: [PATCH] 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 6fcb077a98a4681af15d2431977d367256f8e667) --- src/devices/nm-device.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index f3b682a780..1f745e642f 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -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)) {