Skip to content

Commit

Permalink
Fix possible memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
thebaron06 committed Mar 15, 2017
1 parent f73ec11 commit 2acb609
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ stlink_t *stlink_open_usb(enum ugly_loglevel verbose, bool reset, char serial[16
if (ret != 0) {
WLOG("Error %d (%s) opening ST-Link/V2 device %03d:%03d\n",
ret, strerror (errno), libusb_get_bus_number(list[cnt]), libusb_get_device_address(list[cnt]));
libusb_free_device_list(list, 1);
goto on_error;
}
}
Expand Down

0 comments on commit 2acb609

Please sign in to comment.