forked from Ivasoft/DSView
The libusb_free_device_list do not release the device handel
This commit is contained in:
@@ -371,7 +371,7 @@ static GSList *scan(GSList *options)
|
||||
}
|
||||
}
|
||||
|
||||
libusb_free_device_list(devlist, 1);
|
||||
libusb_free_device_list(devlist, 0);
|
||||
|
||||
if (conn_devices){
|
||||
g_slist_free_full(conn_devices, (GDestroyNotify)sr_usb_dev_inst_free);
|
||||
|
||||
@@ -457,7 +457,7 @@ static GSList *scan(GSList *options)
|
||||
}
|
||||
}
|
||||
|
||||
libusb_free_device_list(devlist, 1);
|
||||
libusb_free_device_list(devlist, 0);
|
||||
|
||||
if (conn_devices){
|
||||
g_slist_free_full(conn_devices, (GDestroyNotify)sr_usb_dev_inst_free);
|
||||
|
||||
@@ -138,7 +138,7 @@ SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn)
|
||||
|
||||
devices = g_slist_append(devices, usb);
|
||||
}
|
||||
libusb_free_device_list(devlist, 1);
|
||||
libusb_free_device_list(devlist, 0);
|
||||
|
||||
sr_dbg("Found %d device(s).", g_slist_length(devices));
|
||||
|
||||
@@ -205,7 +205,7 @@ SR_PRIV GSList *sr_usb_find_usbtmc(libusb_context *usb_ctx)
|
||||
libusb_free_config_descriptor(confdes);
|
||||
}
|
||||
}
|
||||
libusb_free_device_list(devlist, 1);
|
||||
libusb_free_device_list(devlist, 0);
|
||||
|
||||
sr_dbg("Found %d device(s).", g_slist_length(devices));
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@ SR_PRIV int ds_scan_all_device_list(libusb_context *usb_ctx,struct libusb_device
|
||||
|
||||
*count = wr;
|
||||
|
||||
libusb_free_device_list(devlist, 1);
|
||||
libusb_free_device_list(devlist, 0);
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user