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: memleak/handling FTDI adapters #1624

Merged
merged 2 commits into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/platforms/hosted/bmp_libusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ int find_debuggers(bmda_cli_options_s *cl_opts, bmda_probe_s *info)
// Don't know the cable type, ask user to specify with "-c"
DEBUG_WARN("Multiple FTDI adapters match Vendor and Product ID.\n");
DEBUG_WARN("Please specify adapter type on command line using \"-c\" option.\n");
probe_info_list_free(probe_list);
return -1; //false
}
/* If the selected probe is CMSIS-DAP, check for v2 interfaces */
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/hosted/ftdi_bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ bool ftdi_lookup_adapter_from_vid_pid(bmda_cli_options_s *const cl_opts, const p
bool ftdi_lookup_cable_by_product(bmda_cli_options_s *cl_opts, const char *product)
{
if (cl_opts->opt_cable)
return false;
return true;

for (const cable_desc_s *cable = &cable_desc[0]; cable->vendor; ++cable) {
if (cable->description && strstr(product, cable->description) != 0) {
Expand Down