aboutsummaryrefslogtreecommitdiff
path: root/src/openocd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/openocd.c')
-rw-r--r--src/openocd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/openocd.c b/src/openocd.c
index 94fab3a9..83329b51 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -297,8 +297,10 @@ static int openocd_thread(int argc, char *argv[], struct command_context *cmd_ct
if (init_at_startup) {
ret = command_run_line(cmd_ctx, "init");
- if (ERROR_OK != ret)
+ if (ERROR_OK != ret) {
+ server_quit();
return ERROR_FAIL;
+ }
}
ret = server_loop(cmd_ctx);