aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ctl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ctl.c b/src/ctl.c
index 3cbe459..7d44cf1 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -249,22 +249,32 @@ input_init (struct input *inp)
static void
input_destroy (struct input *inp)
{
ctlbuf_free (&inp->ibuf);
grecs_symtab_free (inp->headers);
+ free (inp->input_method);
+ free (inp->input_uri);
+ free (inp->input_proto);
}
static void
input_reset (struct input *inp)
{
inp->input_state = is_initial;
grecs_symtab_clear (inp->headers);
+
+ free (inp->input_method);
inp->input_method = NULL;
+
+ free (inp->input_uri);
inp->input_uri = NULL;
+
+ free (inp->input_proto);
inp->input_proto = NULL;
+
inp->input_content_length = 0;
ctlbuf_flush (&inp->ibuf);
}
static int
input_append (struct input *inp, char c)
@@ -1969,13 +1979,13 @@ select_and_run (struct ctlio *io, struct pcond_node *cond,
int wakeup = 0;
memset (&env, 0, sizeof (env));
env.io = io;
env.cond = cond;
env.fun = NULL;
- env.result = json_new_array ();
+ env.result = NULL;
switch (meth)
{
case METH_GET:
env.allowed_state = CTL_USER_STATE | CTL_ADMIN_STATE;
env.fun = fun_list;

Return to:

Send suggestions and report system problems to the System administrator.