Browse Source

[mod_fastcgi] fix memleak with FastCGI auth,resp (fixes #2894)

fix memleak in mod_fastcgi when FastCGI is used for both authentication
and response on the same request

(thx rschmid)

x-ref:
  "Memory leak if two fcgi calls with one request (authentication and response)"
  https://redmine.lighttpd.net/issues/2894
personal/stbuehler/fix-fdevent
Glenn Strauss 3 years ago
parent
commit
eb429c9c19
  1. 7
      src/mod_fastcgi.c

7
src/mod_fastcgi.c

@ -515,7 +515,12 @@ static handler_t fcgi_check_extension(server *srv, connection *con, void *p_d, i
hctx->opts.pdata = hctx;
hctx->stdin_append = fcgi_stdin_append;
hctx->create_env = fcgi_create_env;
hctx->rb = chunkqueue_init();
if (!hctx->rb) {
hctx->rb = chunkqueue_init();
}
else {
chunkqueue_reset(hctx->rb);
}
}
return HANDLER_GO_ON;

Loading…
Cancel
Save