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:
@@ -2682,6 +2682,15 @@ int arm7_9_examine(struct target *target)
|
||||
return retval;
|
||||
}
|
||||
|
||||
void arm7_9_deinit(struct target *target)
|
||||
{
|
||||
struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
|
||||
|
||||
if (target_was_examined(target))
|
||||
embeddedice_free_reg_cache(arm7_9->eice_cache);
|
||||
|
||||
arm_jtag_close_connection(&arm7_9->jtag_info);
|
||||
}
|
||||
|
||||
int arm7_9_check_reset(struct target *target)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user