mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Fixed potential memory leak when there is an intervention and log or url is set.
This commit is contained in:
parent
dab9bb6a11
commit
0dce46062b
@ -73,7 +73,7 @@ int main(int argc, char *argv[]) {
|
|||||||
modsecurity::ModSecurity *modsec;
|
modsecurity::ModSecurity *modsec;
|
||||||
modsecurity::RulesSet *rules;
|
modsecurity::RulesSet *rules;
|
||||||
modsecurity::ModSecurityIntervention it;
|
modsecurity::ModSecurityIntervention it;
|
||||||
modsecurity::intervention::reset(&it);
|
modsecurity::intervention::clean(&it);
|
||||||
modsec = new modsecurity::ModSecurity();
|
modsec = new modsecurity::ModSecurity();
|
||||||
modsec->setConnectorInformation("ModSecurity-benchmark v0.0.1-alpha" \
|
modsec->setConnectorInformation("ModSecurity-benchmark v0.0.1-alpha" \
|
||||||
" (ModSecurity benchmark utility)");
|
" (ModSecurity benchmark utility)");
|
||||||
@ -167,6 +167,8 @@ int main(int argc, char *argv[]) {
|
|||||||
next_request:
|
next_request:
|
||||||
modsecTransaction->processLogging();
|
modsecTransaction->processLogging();
|
||||||
delete modsecTransaction;
|
delete modsecTransaction;
|
||||||
|
modsecurity::intervention::free(&it);
|
||||||
|
modsecurity::intervention::clean(&it);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete rules;
|
delete rules;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user