You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2014/04/05 13:57:46 UTC
svn commit: r1585072 - /httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c
Author: trawick
Date: Sat Apr 5 11:57:46 2014
New Revision: 1585072
URL: http://svn.apache.org/r1585072
Log:
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
Modified:
httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c
Modified: httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c?rev=1585072&r1=1585071&r2=1585072&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c Sat Apr 5 11:57:46 2014
@@ -759,8 +759,6 @@ static void req_rsp(request_rec *r, cons
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, cons
* 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)