This is an automated email from Gerrit. "zapb <d...@zapb.de>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7956
-- gerrit commit 0e2cc521bbdda371e7ef7dbb4ff4fd405b514766 Author: Marc Schink <d...@zapb.de> Date: Wed Nov 1 09:27:05 2023 +0100 target: Remove break/watchpoints in target_destroy() Break- and watchpoints are not removed when a target is destroyed which introduces a memory leak. Change-Id: I6143d48f7efd765b7752a12fdc337da3496d896f Signed-off-by: Marc Schink <d...@zapb.de> diff --git a/src/target/target.c b/src/target/target.c index 10d0088d53..cb351c694c 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2212,6 +2212,9 @@ uint32_t target_get_working_area_avail(struct target *target) static void target_destroy(struct target *target) { + breakpoint_remove_all(target); + watchpoint_remove_all(target); + if (target->type->deinit_target) target->type->deinit_target(target); --