jtag/adapter: fix memory leak on usb location
At exit, free the memory allocated to hold the USB location. Change-Id: I050701f4dc8be14fd40e8add9d0b047461fa0d1c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6646 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
This commit is contained in:
parent
ac1a632ba1
commit
e9a569aa18
|
@ -120,6 +120,8 @@ int adapter_quit(void)
|
|||
LOG_ERROR("failed: %d", result);
|
||||
}
|
||||
|
||||
free(adapter_config.usb_location);
|
||||
|
||||
struct jtag_tap *t = jtag_all_taps();
|
||||
while (t) {
|
||||
struct jtag_tap *n = t->next_tap;
|
||||
|
|
Loading…
Reference in New Issue