target/mem_ap: fix two memory leaks
authorAntonio Borneo <borneo.antonio@gmail.com>
Fri, 22 May 2020 16:08:55 +0000 (18:08 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 6 Jun 2020 17:05:08 +0000 (18:05 +0100)
commit061cae171c9d2b6015a565dcc748dd04319e08cf
treedd30bd560ec1e39cec98829352ab0f5e15b9dee4
parentf6b4079ce5793f86b2c26c6bfcc8c717e2c8a3c3
target/mem_ap: fix two memory leaks

The target mem_ap misses the method 'deinit_target' and does not
free the memory allocated during 'target create' and 'configure'.

Add the missing method and free the allocated memory.
Issue identified with valgrind.

Change-Id: If0d0114a75dd76a8b65c2d46d96c6085fd31a09d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5700
Tested-by: jenkins
src/target/mem_ap.c