mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-09 17:54:37 +03:00
Add rule temporary memory pool fix from trunk.
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -21,6 +21,8 @@
|
||||
* Added SecAuditLog2 directive to allow redundent concurrent audit log
|
||||
index files. This will allow sending audit data to two consoles, etc.
|
||||
|
||||
* Small performance improvement in memory management for rule execution.
|
||||
|
||||
|
||||
11 Apr 2007 - 2.1.1
|
||||
-------------------
|
||||
|
||||
16
apache2/re.c
16
apache2/re.c
@@ -1251,12 +1251,16 @@ apr_status_t msre_rule_process(msre_rule *rule, modsec_rec *msr) {
|
||||
multi_match = 1;
|
||||
}
|
||||
|
||||
/* Create a memory pool that will be used during the
|
||||
* processing of this rule only.
|
||||
*/
|
||||
/* IMP1 Why not have one pool and just clear it between rules? */
|
||||
if (apr_pool_create(&mptmp, NULL) != APR_SUCCESS) {
|
||||
return -1;
|
||||
/* Use a fresh memory sub-pool for processing each rule */
|
||||
if (msr->msc_rule_mptmp == NULL) {
|
||||
if (apr_pool_create(&msr->msc_rule_mptmp, msr->mp) != APR_SUCCESS) {
|
||||
return -1;
|
||||
}
|
||||
mptmp = msr->msc_rule_mptmp;
|
||||
}
|
||||
else {
|
||||
mptmp = msr->msc_rule_mptmp;
|
||||
apr_pool_clear(mptmp);
|
||||
}
|
||||
|
||||
tartab = apr_table_make(mptmp, 24);
|
||||
|
||||
Reference in New Issue
Block a user