summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-10-07 20:25:00 +0200
committerGravatar Nikias Bassen2019-10-07 20:25:00 +0200
commit135ab5253879c197edae416b523e01aad4e13d98 (patch)
treed5e04780fed60531a024781839aa6b6a0eafa224 /src
parentc3fc55697b8fdf59055e4842a9e6bf7db15a35c9 (diff)
downloadusbmuxd-135ab5253879c197edae416b523e01aad4e13d98.tar.gz
usbmuxd-135ab5253879c197edae416b523e01aad4e13d98.tar.bz2
device: Make sure to operate on the copy of the device list in device_get_list()
Diffstat (limited to 'src')
-rw-r--r--src/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index ba5ed73..afb2d92 100644
--- a/src/device.c
+++ b/src/device.c
@@ -933,7 +933,7 @@ int device_get_list(int include_hidden, struct device_info **devices)
*devices = malloc(sizeof(struct device_info) * dev_list.capacity);
struct device_info *p = *devices;
- FOREACH(struct mux_device *dev, &device_list) {
+ FOREACH(struct mux_device *dev, &dev_list) {
if((dev->state == MUXDEV_ACTIVE) && (include_hidden || dev->visible)) {
p->id = dev->id;
p->serial = usb_get_serial(dev->usbdev);