From: openocd-gerrit <ope...@us...> - 2025-01-09 20:17:12
|
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 d4b3b4ea82ba6d34b050a1cc068e0b105533e2f2 (commit) from cf115c1e2b670ea8b4606cde0c9b5db735a08742 (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 d4b3b4ea82ba6d34b050a1cc068e0b105533e2f2 Author: Tomas Vanek <va...@fb...> Date: Tue Dec 10 13:48:53 2024 +0100 target: free private_config if target initialisation fails Fixes private_config memory leak when xx_deinit_target() is not called Signed-off-by: Tomas Vanek <va...@fb...> Change-Id: Ie7cce7f24af24695e7d2c1cd1882474c6863b80d Reviewed-on: https://review.openocd.org/c/openocd/+/8642 Tested-by: jenkins Reviewed-by: zapb <de...@za...> Reviewed-by: Evgeniy Naydanov <evg...@sy...> diff --git a/src/target/target.c b/src/target/target.c index 6c474899a..1fc8baf2c 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -5848,6 +5848,7 @@ static int target_create(struct jim_getopt_info *goi) free(target->gdb_port_override); free(target->trace_info); free(target->type); + free(target->private_config); free(target); return e; } @@ -5865,6 +5866,7 @@ static int target_create(struct jim_getopt_info *goi) free(target->gdb_port_override); free(target->trace_info); free(target->type); + free(target->private_config); free(target); return JIM_ERR; } @@ -5878,6 +5880,7 @@ static int target_create(struct jim_getopt_info *goi) free(target->gdb_port_override); free(target->trace_info); free(target->type); + free(target->private_config); free(target); return JIM_ERR; } ----------------------------------------------------------------------- Summary of changes: src/target/target.c | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- Main OpenOCD repository |