diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2021-10-07 18:13:21 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-11-13 10:51:19 +0000 |
commit | e9a569aa18230766ae0bb6dd1a6dc843eb8c087b (patch) | |
tree | 80984ad2ad51927ec08f121281022dad952dce38 /src | |
parent | ac1a632ba13efa77393cecf29bd29410db60cada (diff) | |
download | riscv-openocd-e9a569aa18230766ae0bb6dd1a6dc843eb8c087b.zip riscv-openocd-e9a569aa18230766ae0bb6dd1a6dc843eb8c087b.tar.gz riscv-openocd-e9a569aa18230766ae0bb6dd1a6dc843eb8c087b.tar.bz2 |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/adapter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c index a5a6222..c30019c 100644 --- a/src/jtag/adapter.c +++ b/src/jtag/adapter.c @@ -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; |