target/arm926ejs: fix memory leaks

The memory leaks detected and fixed are:
- arm register cache;
- EmbeddedICE register cache;
- arm_jtag_reset_callback internal data;
- struct arm926ejs_common.

Issue identified with valgrind.
Tested on SPEAr320 based on arm926ejs.

Change-Id: If2bed02c516051ce4d0eb29b204a3f3337fe5d6a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5698
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2020-06-14 23:18:21 +02:00
parent 6a81bad3b9
commit f29d157882
7 changed files with 44 additions and 0 deletions

View File

@@ -88,6 +88,7 @@ struct embeddedice_reg {
struct reg_cache *embeddedice_build_reg_cache(struct target *target,
struct arm7_9_common *arm7_9);
void embeddedice_free_reg_cache(struct reg_cache *reg_cache);
int embeddedice_setup(struct target *target);