diff options
author | Marc Schink <openocd-dev@marcschink.de> | 2019-02-06 12:07:10 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-02-14 09:28:33 +0000 |
commit | a851b91c4c1db76dd1e26a7d1a99124ad456b020 (patch) | |
tree | 2e3b372a5c948ecbcdc6f8d6babf54294ee39224 /src/target | |
parent | 6c2020eb48803b941a94d600e2a96728d05a7da9 (diff) | |
download | riscv-openocd-a851b91c4c1db76dd1e26a7d1a99124ad456b020.zip riscv-openocd-a851b91c4c1db76dd1e26a7d1a99124ad456b020.tar.gz riscv-openocd-a851b91c4c1db76dd1e26a7d1a99124ad456b020.tar.bz2 |
target/riscv-011: Fix memory leak in handle_halt_routine()
Tested with SiFive HiFive1 development board.
Change-Id: Ie0d9fa0899804d17ccdd84b03ba4028e97b632b8
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/4884
Tested-by: jenkins
Reviewed-by: Tim Newsome <tim@sifive.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/riscv/riscv-011.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/riscv/riscv-011.c b/src/target/riscv/riscv-011.c index 3820d8f..bd3f159 100644 --- a/src/target/riscv/riscv-011.c +++ b/src/target/riscv/riscv-011.c @@ -1806,6 +1806,8 @@ static riscv_error_t handle_halt_routine(struct target *target) } } + scans_delete(scans); + if (dbus_busy) { increase_dbus_busy_delay(target); return RE_AGAIN; @@ -1819,8 +1821,6 @@ static riscv_error_t handle_halt_routine(struct target *target) info->dpc = reg_cache_get(target, CSR_DPC); info->dcsr = reg_cache_get(target, CSR_DCSR); - scans_delete(scans); - cache_invalidate(target); return RE_OK; |