mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-14 23:47:11 +03:00
updategetbyid memory leak
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -5,6 +5,8 @@
|
||||
|
||||
* Fixed ModSecurity cannot load session and user sdbm data.
|
||||
|
||||
* Fixed updateTargetById was creating rule unparsed content making apache memory grow.
|
||||
|
||||
* Code cleanup.
|
||||
|
||||
23 Feb 2012 - 2.6.4-rc1
|
||||
|
||||
19
apache2/re.c
19
apache2/re.c
@@ -237,17 +237,24 @@ char *update_rule_target(cmd_parms *cmd, directory_config *dcfg,
|
||||
p = apr_strtok(NULL,",",&savedptr);
|
||||
}
|
||||
|
||||
curr_targets = msre_generate_target_string(ruleset->mp, rule);
|
||||
|
||||
rule->unparsed = msre_rule_generate_unparsed(ruleset->mp, rule, curr_targets, NULL, NULL);
|
||||
if(match == 0) {
|
||||
curr_targets = msre_generate_target_string(ruleset->mp, rule);
|
||||
rule->unparsed = msre_rule_generate_unparsed(ruleset->mp, rule, curr_targets, NULL, NULL);
|
||||
}
|
||||
|
||||
end:
|
||||
if(target_list != NULL)
|
||||
if(target_list != NULL) {
|
||||
free(target_list);
|
||||
if(replace != NULL)
|
||||
target_list = NULL;
|
||||
}
|
||||
if(replace != NULL) {
|
||||
free(replace);
|
||||
if(target != NULL)
|
||||
replace = NULL;
|
||||
}
|
||||
if(target != NULL) {
|
||||
free(target);
|
||||
target = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user