summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-06-23 15:12:19 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-06-23 15:12:19 +0200
commit0e2ddfd071e7be9c400e435ac310468002ef4b70 (patch)
tree9707b79e4d34b2ca2967f0cbdac05e27b33d021d
parent9f9c82f39b08f54d5d73f3d3f5a9939818b2cc62 (diff)
downloadNetworkManager-0e2ddfd071e7be9c400e435ac310468002ef4b70.tar.gz
nmcli/devices: fix a crash
This is not good: $ nmcli device delete nm-bond Segmentation fault (core dumped) Fixes: 5f9d2927ed02 ("nmcli/devices: use GPtrArray from get_device_list() directly")
-rw-r--r--src/nmcli/devices.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nmcli/devices.c b/src/nmcli/devices.c
index 56214bffec..43bd3724b7 100644
--- a/src/nmcli/devices.c
+++ b/src/nmcli/devices.c
@@ -2733,8 +2733,8 @@ do_devices_delete(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const
nmc->nowait_flag = (nmc->timeout == 0);
nmc->should_wait++;
- for (i = 0; i < queue->len; i++) {
- nm_device_delete_async(queue->pdata[i], NULL, delete_device_cb, info);
+ for (i = 0; i < info->queue->len; i++) {
+ nm_device_delete_async(info->queue->pdata[i], NULL, delete_device_cb, info);
}
}