|
From: openocd-gerrit <ope...@us...> - 2023-11-18 11:17:24
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 3862e07688ea68298841891145deddd226c3c7e5 (commit)
from d4575b647a3603200a9bb4a784d170f792ab88d0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3862e07688ea68298841891145deddd226c3c7e5
Author: Marc Schink <de...@za...>
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 <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7956
Reviewed-by: Marek Vrbka <mar...@co...>
Reviewed-by: Tomas Vanek <va...@fb...>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/target/target.c b/src/target/target.c
index 148bc9fb7..30f7029a5 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);
-----------------------------------------------------------------------
Summary of changes:
src/target/target.c | 3 +++
1 file changed, 3 insertions(+)
hooks/post-receive
--
Main OpenOCD repository
|