From: Antonio Borneo Date: Fri, 7 May 2021 14:17:32 +0000 (+0200) Subject: target/cortex_a: fix memory leak on watchpoints X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=3bd26ebb59e2932b361b40176b818174f561f901;p=fw%2Fopenocd 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 Reviewed-on: http://openocd.zylin.com/6210 Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 9a48cc8b1..35f149970 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);