diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2021-05-07 16:17:32 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-06-03 23:27:20 +0100 |
commit | 3bd26ebb59e2932b361b40176b818174f561f901 (patch) | |
tree | 6bf4fd2bce8a5ac915f7fcb1ae6ec223366c1d52 /src | |
parent | 0c64bb2583a67b551a482ddc13a08dc71a143da3 (diff) | |
download | riscv-openocd-3bd26ebb59e2932b361b40176b818174f561f901.zip riscv-openocd-3bd26ebb59e2932b361b40176b818174f561f901.tar.gz riscv-openocd-3bd26ebb59e2932b361b40176b818174f561f901.tar.bz2 |
target/cortex_a: fix memory leak on watchpoints
The memory allocated to hold the watchpoints is not freed at
OpenOCD exit.
Free the watchpoint memory at OpenOCD exit.
Change-Id: I518c9ce0dc901cde2913d752e3154734f878b854
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6210
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/cortex_a.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 9a48cc8..35f1499 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -3181,6 +3181,7 @@ static void cortex_a_deinit_target(struct target *target) dscr & ~DSCR_HALT_DBG_MODE); } + free(cortex_a->wrp_list); free(cortex_a->brp_list); arm_free_reg_cache(dpm->arm); free(dpm->dbp); |