From: Jeff Trawick Date: Sat, 5 Apr 2014 11:57:46 +0000 (+0000) Subject: move a temporary table from r->pool to a temporary X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9656681211d0c13bb66489e0740b3676e9c1b0e;p=thirdparty%2Fapache%2Fhttpd.git move a temporary table from r->pool to a temporary pool we've already allocated in order to avoid a longer lifetime than necessary for the table memory Suggested by: jailletc36 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1585072 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/aaa/mod_authnz_fcgi.c b/modules/aaa/mod_authnz_fcgi.c index 7c573d523d5..673b0e774d9 100644 --- a/modules/aaa/mod_authnz_fcgi.c +++ b/modules/aaa/mod_authnz_fcgi.c @@ -759,8 +759,6 @@ static void req_rsp(request_rec *r, const fcgi_provider_conf *conf, apr_socket_close(s); } - apr_pool_destroy(temp_pool); - if (rv != APR_SUCCESS) { /* some sort of mechanical problem */ r->status = HTTP_INTERNAL_SERVER_ERROR; @@ -779,11 +777,17 @@ static void req_rsp(request_rec *r, const fcgi_provider_conf *conf, * available to subsequent phases via subprocess_env (and yanked * from the client response). */ - apr_table_t *vars = apr_table_make(r->pool, 10); + apr_table_t *vars = apr_table_make(temp_pool, /* not used to allocate + * any values that end up + * in r->(anything) + */ + 10); apr_table_do(mod_fcgid_modify_auth_header, vars, r->err_headers_out, NULL); apr_table_do(fix_auth_header, r, vars, NULL); } + + apr_pool_destroy(temp_pool); } static int fcgi_check_authn(request_rec *r)