From bb39b51155d9a05906573fb09c2e4a8572768e89 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Mon, 6 Aug 2001 18:43:30 +0000 Subject: Same cleanups as applied to mod_cgi, falling out of scope != destruction in plain ol' C. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89944 13f79535-47bb-0310-9956-ffa450edef68 --- modules/generators/mod_cgid.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 6d6a8646f7..8093a1f4f5 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -1052,15 +1052,18 @@ static int include_cgi(char *s, request_rec *r, ap_filter_t *next, apr_bucket *tmp_buck, *tmp2_buck; if (rr->status != HTTP_OK) { + ap_destroy_sub_req(rr); return -1; } /* No hardwired path info or query allowed */ if ((rr->path_info && rr->path_info[0]) || rr->args) { + ap_destroy_sub_req(rr); return -1; } if (rr->finfo.filetype != APR_REG) { + ap_destroy_sub_req(rr); return -1; } @@ -1124,6 +1127,7 @@ static void add_ssi_vars(request_rec *r, ap_filter_t *next) apr_table_setn(e, "PATH_TRANSLATED", apr_pstrcat(r->pool, pa_req->filename, pa_req->path_info, NULL)); } + ap_destroy_sub_req(pa_req); } if (r->args) { -- cgit v1.2.1