]> granicus.if.org Git - apache/commitdiff
Same cleanups as applied to mod_cgi, falling out of scope != destruction
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 6 Aug 2001 18:43:30 +0000 (18:43 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 6 Aug 2001 18:43:30 +0000 (18:43 +0000)
  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

index 6d6a8646f7e6d2b9c1897e2878b88dcc377af4f5..8093a1f4f5e0947bd50a0b3fe91cba7b30beda37 100644 (file)
@@ -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) {