From: Joe Orton Date: Fri, 3 Jun 2005 10:12:50 +0000 (+0000) Subject: * modules/filters/mod_include.c (handle_include): Fix possible X-Git-Tag: 2.1.5~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aad70a1145ebb062c26a906107732a3c53fdb898;p=thirdparty%2Fapache%2Fhttpd.git * modules/filters/mod_include.c (handle_include): Fix possible variable corruption with nested includes. PR: 12655 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@179763 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 538375681b0..71b5e2b5a0f 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -1699,10 +1699,10 @@ static apr_status_t handle_include(include_ctx_t *ctx, ap_filter_t *f, SSI_CREATE_ERROR_BUCKET(ctx, f, bb); } - /* destroy the sub request */ - if (rr) { - ap_destroy_sub_req(rr); - } + /* Do *not* destroy the subrequest here; it may have allocated + * variables in this r->subprocess_env in the subrequest's + * r->pool, so that pool must survive as long as this request. + * Yes, this is a memory leak. */ if (error_fmt) { break;