From 4c9f41f1adbdf2e9c5fa2def959ac13ea4a9785c Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 10 Oct 2013 11:45:28 +0000 Subject: Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd can be NULL. Avoids crash when a command in a command client can't be parsed. --- control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'control.c') diff --git a/control.c b/control.c index 1f3739fc..8e24fd0e 100644 --- a/control.c +++ b/control.c @@ -73,9 +73,9 @@ control_callback(struct client *c, int closed, unused void *data) c->cmdq->time = time(NULL); c->cmdq->number++; - cmdq_guard(c->cmdq, "begin"); + cmdq_guard(c->cmdq, "begin", 1); control_write(c, "parse error: %s", cause); - cmdq_guard(c->cmdq, "error"); + cmdq_guard(c->cmdq, "error", 1); free(cause); } else { -- cgit v1.2.3