Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for 'libusb_devices were leaked' when no ST-LINK programmer was found #1150

Merged
merged 2 commits into from
Jun 16, 2021

Conversation

gustavolaureano
Copy link
Contributor

@gustavolaureano gustavolaureano commented Jun 6, 2021

When searching for interfaces, the libstlink is not unreferencing the probed USB devices when no ST-LINK programmer was found, leading to "libsub_devices were leaked" warnings, as shown below:
image

This warning is evidenced when using the libstlink to poll for ST-LINK interfaces on Windows (I am developing an application that waits for a ST-LINK programmer to be connected.)

A description of the problem and solution can be found here:
https://libusb-devel.narkive.com/KfZ3490q/warning-some-libusb-devices-were-leaked

@Nightwalker-87
Copy link
Member

@gustavolaureano Can you address this?

@Nightwalker-87 Nightwalker-87 changed the title fix for 'libusb_devices were leaked' when no stlink was found Fix for 'libusb_devices were leaked' when no STLINK programmer was found Jun 16, 2021
@Nightwalker-87 Nightwalker-87 merged commit 01418b5 into stlink-org:develop Jun 16, 2021
@Nightwalker-87 Nightwalker-87 changed the title Fix for 'libusb_devices were leaked' when no STLINK programmer was found Fix for 'libusb_devices were leaked' when no ST-LINK programmer was found Jun 16, 2021
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Jun 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants