From d4d8b2b91f7ba000d97a8b2aab48c85000c11314 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 4 Oct 2023 11:44:49 +0200 Subject: New upstream version 1.44.2 --- src/core/nm-checkpoint.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/core/nm-checkpoint.c') diff --git a/src/core/nm-checkpoint.c b/src/core/nm-checkpoint.c index 5c4d4e53..74adf484 100644 --- a/src/core/nm-checkpoint.c +++ b/src/core/nm-checkpoint.c @@ -460,24 +460,27 @@ next_dev: NMDeviceState state; nm_manager_for_each_device (priv->manager, device, tmp_lst) { - gboolean found = FALSE; - if (g_hash_table_contains(priv->devices, device)) continue; /* Also ignore devices that were in the checkpoint initially and * were moved to 'removed_devices' because they got removed from * the system. */ - for (i = 0; i < priv->removed_devices->len; i++) { - dev_checkpoint = priv->removed_devices->pdata[i]; - if (dev_checkpoint->dev_type == nm_device_get_device_type(device) - && nm_streq0(dev_checkpoint->original_dev_name, nm_device_get_iface(device))) { - found = TRUE; - break; + if (priv->removed_devices) { + gboolean found = FALSE; + + for (i = 0; i < priv->removed_devices->len; i++) { + dev_checkpoint = priv->removed_devices->pdata[i]; + if (dev_checkpoint->dev_type == nm_device_get_device_type(device) + && nm_streq0(dev_checkpoint->original_dev_name, + nm_device_get_iface(device))) { + found = TRUE; + break; + } } + if (found) + continue; } - if (found) - continue; state = nm_device_get_state(device); if (state > NM_DEVICE_STATE_DISCONNECTED && state < NM_DEVICE_STATE_DEACTIVATING) { -- cgit 1.3.0-6-gf8a5