cdba: Exit nicely on communication error

Receiving an invalid command should lead to termination of the client,
but doing so abruptly will cause the termios not to be reset.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Bjorn Andersson
2020-06-28 23:43:59 -07:00
parent e0dcdf1b53
commit 72c373451c

2
cdba.c
View File

@@ -453,7 +453,7 @@ static int handle_message(struct circ_buf *buf)
break;
default:
fprintf(stderr, "unk %d len %d\n", msg->type, msg->len);
exit(1);
return -1;
}
free(msg);