summaryrefslogtreecommitdiffstats
path: root/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'control.c')
-rw-r--r--control.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/control.c b/control.c
index d3515005..ddbbda8e 100644
--- a/control.c
+++ b/control.c
@@ -60,6 +60,7 @@ control_callback(__unused struct client *c, __unused const char *path,
{
char *line;
struct cmdq_item *item;
+ struct cmdq_state *state;
struct cmd_parse_result *pr;
if (closed || error != 0)
@@ -85,9 +86,10 @@ control_callback(__unused struct client *c, __unused const char *path,
cmdq_append(c, item);
break;
case CMD_PARSE_SUCCESS:
- item = cmdq_get_command(pr->cmdlist, NULL, NULL,
- CMDQ_STATE_CONTROL);
+ state = cmdq_new_state(NULL, NULL, CMDQ_STATE_CONTROL);
+ item = cmdq_get_command(pr->cmdlist, state);
cmdq_append(c, item);
+ cmdq_free_state(state);
cmd_list_free(pr->cmdlist);
break;
}