mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-10 02:04:36 +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
|
* Added SecAuditLog2 directive to allow redundent concurrent audit log
|
||||||
index files. This will allow sending audit data to two consoles, etc.
|
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
|
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;
|
multi_match = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a memory pool that will be used during the
|
/* Use a fresh memory sub-pool for processing each rule */
|
||||||
* processing of this rule only.
|
if (msr->msc_rule_mptmp == NULL) {
|
||||||
*/
|
if (apr_pool_create(&msr->msc_rule_mptmp, msr->mp) != APR_SUCCESS) {
|
||||||
/* IMP1 Why not have one pool and just clear it between rules? */
|
return -1;
|
||||||
if (apr_pool_create(&mptmp, NULL) != 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);
|
tartab = apr_table_make(mptmp, 24);
|
||||||
|
|||||||
Reference in New Issue
Block a user