- Fix small memleak in fastcgi module.

Submitted by:	Chris Peiffer <chris__cabstand.com>
This commit is contained in:
Marcus Alves Grando 2008-09-07 15:05:44 +00:00
parent 5d3a4b6a70
commit f61acf41a1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=220137

View file

@ -0,0 +1,18 @@
#
# http://trac.lighttpd.net/trac/changeset/2143
#
Index: /branches/lighttpd-1.4.x/src/mod_fastcgi.c
===================================================================
--- src/mod_fastcgi.c (revision 2119)
+++ src/mod_fastcgi.c (revision 2143)
@@ -2545,5 +2545,8 @@
if (HANDLER_ERROR != stat_cache_get_entry(srv, con, ds->value, &sce)) {
- data_string *dcls = data_string_init();
+ data_string *dcls;
+ if (NULL == (dcls = (data_string *)array_get_unused_element(con->response.headers, TYPE_STRING))) {
+ dcls = data_response_init();
+ }
/* found */
http_chunk_append_file(srv, con, ds->value, 0, sce->st.st_size);