aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-02-21 16:29:37 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-02-21 16:29:37 +0200
commit910b8cf881052050c0edade38d0f9de8cdacf3c6 (patch)
treee13b48bc0782df22ef989c3dd942ef8496cb36d6 /src
parent722533c595a0976e50cca45dca7f28ff7e599970 (diff)
downloadpies-910b8cf881052050c0edade38d0f9de8cdacf3c6.tar.gz
pies-910b8cf881052050c0edade38d0f9de8cdacf3c6.tar.bz2
Fix memory leaks
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
@@ -252,6 +252,9 @@ input_destroy (struct input *inp)
252{ 252{
253 ctlbuf_free (&inp->ibuf); 253 ctlbuf_free (&inp->ibuf);
254 grecs_symtab_free (inp->headers); 254 grecs_symtab_free (inp->headers);
255 free (inp->input_method);
256 free (inp->input_uri);
257 free (inp->input_proto);
255} 258}
256 259
257static void 260static void
@@ -259,9 +262,16 @@ input_reset (struct input *inp)
259{ 262{
260 inp->input_state = is_initial; 263 inp->input_state = is_initial;
261 grecs_symtab_clear (inp->headers); 264 grecs_symtab_clear (inp->headers);
265
266 free (inp->input_method);
262 inp->input_method = NULL; 267 inp->input_method = NULL;
268
269 free (inp->input_uri);
263 inp->input_uri = NULL; 270 inp->input_uri = NULL;
271
272 free (inp->input_proto);
264 inp->input_proto = NULL; 273 inp->input_proto = NULL;
274
265 inp->input_content_length = 0; 275 inp->input_content_length = 0;
266 ctlbuf_flush (&inp->ibuf); 276 ctlbuf_flush (&inp->ibuf);
267} 277}
@@ -1972,7 +1982,7 @@ select_and_run (struct ctlio *io, struct pcond_node *cond,
1972 env.io = io; 1982 env.io = io;
1973 env.cond = cond; 1983 env.cond = cond;
1974 env.fun = NULL; 1984 env.fun = NULL;
1975 env.result = json_new_array (); 1985 env.result = NULL;
1976 1986
1977 switch (meth) 1987 switch (meth)
1978 { 1988 {

Return to:

Send suggestions and report system problems to the System administrator.