[mod_fastcgi] fix memleak with FastCGI auth,resp (fixes
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)"
@@ -515,8 +515,13 @@ 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;
+ if (!hctx->rb) {
hctx->rb = chunkqueue_init();
}
+ else {
+ chunkqueue_reset(hctx->rb);
+ }
+ }
return HANDLER_GO_ON;
}
