X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fopenocd.c;h=f084dd4522d6294e027578982f803d9c9b86927b;hp=d5d7ebe8768211c97a81caa6320520cf73c65ee6;hb=3117a318d42606cbcfd39559e144f6f6b0313fe9;hpb=37deb37593c20c05a4bb29e1d88671a1f7ec6548 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)