diff options
Diffstat (limited to 'src/server.c')
-rw-r--r-- | src/server.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server.c b/src/server.c index a84016e..c2941c5 100644 --- a/src/server.c +++ b/src/server.c @@ -227,11 +227,16 @@ static int msg_ci_run_handler(struct server *server, int client_fd, const struct ret = msg_ci_run_queue(server, msg->argv[1], msg->argv[2]); if (ret < 0) - msg_error(&response); + ret = msg_error(&response); else - msg_success(&response); + ret = msg_success(&response); - return msg_send(client_fd, &response); + if (ret < 0) + return ret; + + ret = msg_send(client_fd, &response); + msg_free(&response); + return ret; } static int msg_ci_run_parser(const struct msg *msg) |