X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fopenocd.c;h=f084dd4522d6294e027578982f803d9c9b86927b;hb=e36c2f2da47a4f038b6c5647d135e0b6f8d3b708;hp=d5d7ebe8768211c97a81caa6320520cf73c65ee6;hpb=37deb37593c20c05a4bb29e1d88671a1f7ec6548;p=openocd.git diff --git a/src/openocd.c b/src/openocd.c index d5d7ebe876..f084dd4522 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -359,11 +359,15 @@ int openocd_main(int argc, char *argv[]) unregister_all_commands(cmd_ctx, NULL); - /* Shutdown commandline interface */ - command_exit(cmd_ctx); + /* free all DAP and CTI objects */ + dap_cleanup_all(); + arm_cti_cleanup_all(); adapter_quit(); + /* Shutdown commandline interface */ + command_exit(cmd_ctx); + free_config(); if (ERROR_FAIL == ret)