Skip to content

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

Merged
Nightwalker-87 merged 2 commits intostlink-org:developfrom
gustavolaureano:develop
Jun 16, 2021
Merged

Fix for 'libusb_devices were leaked' when no ST-LINK programmer was found#1150
Nightwalker-87 merged 2 commits intostlink-org:developfrom
gustavolaureano:develop

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.

4 participants