https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412018-06-25T13:27:25Zlighty labsLighttpd - Bug #2894: Memory leak if two fcgi calls with one request (authentication and response)https://redmine.lighttpd.net/issues/2894?journal_id=114762018-06-25T13:27:25Zgstrauss
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Patch Pending</i></li><li><strong>Target version</strong> set to <i>1.4.50</i></li></ul><p>Thanks for the report. While the FastCGI auth request likely fits in kernel socket send buffer to backend, it would be a good idea to reset hctx->rb if it was used for auth.</p>
<pre>
--- a/src/mod_fastcgi.c
+++ b/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;
</pre> Lighttpd - Bug #2894: Memory leak if two fcgi calls with one request (authentication and response)https://redmine.lighttpd.net/issues/2894?journal_id=115012018-08-12T19:20:10Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Fixed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="[mod_fastcgi] fix memleak with FastCGI auth,resp (fixes #2894) fix memleak in mod_fastcgi when F..." href="https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/eb429c9c1981aaf8ab2014fe4dd230d27b2e8309">eb429c9c1981aaf8ab2014fe4dd230d27b2e8309</a>.</p>