On Wed, 10 Nov 2010, Ruediger Pluem wrote:
On 11/09/2010 07:34 PM, s...@apache.org wrote:
Author: sf
Date: Tue Nov 9 18:34:43 2010
New Revision: 1033145
URL: http://svn.apache.org/viewvc?rev=1033145&view=rev
Log:
use temp_pool for some temporary regexps
Modified:
httpd/httpd/trunk/modules/metadata/mod_setenvif.c
Modified: httpd/httpd/trunk/modules/metadata/mod_setenvif.c
URL:
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_setenvif.c?rev=1033145&r1=1033144&r2=1033145&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_setenvif.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_setenvif.c Tue Nov 9 18:34:43 2010
@@ -355,7 +355,7 @@ static const char *add_setenvif_core(cmd
new->special_type = SPECIAL_OID_VALUE;
/* Syntax check and extraction of the OID as a regex: */
- new->pnamereg = ap_pregcomp(cmd->pool,
+ new->pnamereg = ap_pregcomp(cmd->temp_pool,
"^oid\\(\"?([0-9.]+)\"?\\)$",
(AP_REG_EXTENDED /* | AP_REG_NOSUB */
| AP_REG_ICASE));
@@ -381,7 +381,7 @@ static const char *add_setenvif_core(cmd
* (new->pnamereg = NULL) to avoid the overhead of searching
* through headers_in for a regex match.
*/
- if (is_header_regex(cmd->pool, fname)) {
+ if (is_header_regex(cmd->temp_pool, fname)) {
Are you sure this is correct here? I don't see new->pnamereg being
discarded afterwards (like in above context).
I kept cmd->pool for this regexp. But is_header_regex internally also
creates a temp regex that it does not store anywhere.
new->pnamereg = ap_pregcomp(cmd->pool, fname,
(AP_REG_EXTENDED | AP_REG_NOSUB
| (icase ? AP_REG_ICASE : 0)));