diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2018-03-22 00:20:15 +0100 |
---|---|---|
committer | Matthias Welwarsky <matthias@welwarsky.de> | 2018-03-30 10:15:23 +0100 |
commit | 6eba3777fca4a3e8c0d91dce9caedfeb9c08dc67 (patch) | |
tree | a8b46c489c58c2545af44fa8c6695baa27e26419 /src/openocd.c | |
parent | 37deb37593c20c05a4bb29e1d88671a1f7ec6548 (diff) |
jtag/core, target: unregister JTAG events
Also call adapter_exit() before command_exit() as the latter releases
Jim interpreter so JTAG events should be released before.
Fixes memory leak reported by valgrind
Change-Id: I493f3fcba34ea2b4234148e79a4e329c866e0f05
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/4474
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src/openocd.c')
-rw-r--r-- | src/openocd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openocd.c b/src/openocd.c index d5d7ebe8..902528d0 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -359,11 +359,11 @@ int openocd_main(int argc, char *argv[]) unregister_all_commands(cmd_ctx, NULL); + adapter_quit(); + /* Shutdown commandline interface */ command_exit(cmd_ctx); - adapter_quit(); - free_config(); if (ERROR_FAIL == ret) |