Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Possible memory leak on libusb_open errors #570

@thebaron06

Description

@thebaron06

In function stlink_open_usb there is a possible memory leak when the call to libusb_open in line 854 fails. If ret is not zero, the code jumps to the on_error label and list is never freed.

A possible fix would be to free list in case of an error, or to check if list in the code that is exceuted when jumping to the on_error label.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions