target/arm11: fix memory leaks, including register cache
authorAntonio Borneo <borneo.antonio@gmail.com>
Mon, 25 May 2020 10:04:17 +0000 (12:04 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 2 Aug 2020 09:48:52 +0000 (10:48 +0100)
commit7c66df13ef5e45c085786206ef061047b522c18e
tree27c5ff250818f7a555d52ab39fb5ef4aeff988ef
parent768502403ee0513d0e289c22b27c7296300fe39d
target/arm11: fix memory leaks, including register cache

There is no deinit_target method, so few memory allocations leak
at openocd exit.
Issue identified by tracking all calls to arm_dpm_setup().

Implement the method arm11_dpm_deinit() to free all the memory
allocated in arm11_dpm_init() and call it in the new
arm11_deinit_target().

NOT TESTED on real HW.

Change-Id: Icab86e290fc2db14f70eb84c8286357aadb02a35
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5694
Tested-by: jenkins
src/target/arm11.c
src/target/arm11_dbgtap.c
src/target/arm11_dbgtap.h