diff options
-rw-r--r-- | src/devices/nm-device.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index b0b2979bc5..46ba294013 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -4234,16 +4234,17 @@ sriov_op_cb (GError *error, gpointer user_data) nm_assert (op == priv->sriov.pending); + priv->sriov.pending = NULL; + if (op->callback) op->callback (error, op->callback_data); - nm_clear_g_cancellable (&op->cancellable); + g_clear_object (&op->cancellable); g_slice_free (SriovOp, op); - priv->sriov.pending = NULL; if (priv->sriov.next) { - sriov_op_start (self, priv->sriov.next); - priv->sriov.next = NULL; + sriov_op_start (self, + g_steal_pointer (&priv->sriov.next)); } } |