summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2005-06-03 10:12:50 +0000
committerJoe Orton <jorton@apache.org>2005-06-03 10:12:50 +0000
commitaad70a1145ebb062c26a906107732a3c53fdb898 (patch)
treed4be32907835a49a5388251ad6ea74f89e0cb483
parent45174f2721c00e7fe893fc9601546848fd8b44a7 (diff)
downloadhttpd-aad70a1145ebb062c26a906107732a3c53fdb898.tar.gz
* 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
-rw-r--r--modules/filters/mod_include.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c
index 538375681b..71b5e2b5a0 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;