openocd: fix cleanup order: cti before dap

cti access is based on dap.
During cleanup, drop cti before dropping dap to guarantee that cti
can still access its dap.

Change-Id: I40c7f67d4d4a32f53802c0ce7668a5321a05893c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6414
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
This commit is contained in:
Antonio Borneo 2021-08-05 00:22:06 +02:00
parent 020e46d186
commit 48282fbce0
1 changed files with 1 additions and 1 deletions

View File

@ -364,8 +364,8 @@ int openocd_main(int argc, char *argv[])
help_del_all_commands(cmd_ctx); help_del_all_commands(cmd_ctx);
/* free all DAP and CTI objects */ /* free all DAP and CTI objects */
dap_cleanup_all();
arm_cti_cleanup_all(); arm_cti_cleanup_all();
dap_cleanup_all();
adapter_quit(); adapter_quit();