mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Handles better the memory utilization
- Added reference counts to Rule and AuditLog; - Some memory leaks were removed, including GeoLookup; - Deal better with parser errors; - Overriding the AutlogLogWritter destructor.
This commit is contained in:
@@ -58,6 +58,21 @@ using ModSecurity::Variables::TimeWDay;
|
||||
using ModSecurity::Variables::TimeYear;
|
||||
using ModSecurity::Variables::Variable;
|
||||
|
||||
/**
|
||||
* %destructor { code } THING
|
||||
*
|
||||
* %destructor is not working as expected. Apparently it was fixed on a most recent,
|
||||
* version of Bison. We are not interested to limit the usage to this newest version,
|
||||
* thus, we have to deal with memory leak when rules failed to load. Not that big
|
||||
* problem, as we don't really continue when it fails (only for SecRemoteRules).
|
||||
*
|
||||
* Information about destructor:
|
||||
* http://www.gnu.org/software/bison/manual/html_node/Destructor-Decl.html
|
||||
*
|
||||
* Patch:
|
||||
* https://www.mail-archive.com/search?l=bug-bison@gnu.org&q=subject:%22Destructor+miscompilation+with+C%2B%2B+variants%3F%22&o=newest&f=1
|
||||
*/
|
||||
|
||||
}
|
||||
// The parsing context.
|
||||
%param { ModSecurity::Parser::Driver& driver }
|
||||
@@ -154,6 +169,7 @@ using ModSecurity::Variables::Variable;
|
||||
%type <std::vector<Action *> *> actions
|
||||
%type <std::vector<Variable *> *> variables
|
||||
|
||||
|
||||
%printer { yyoutput << $$; } <*>;
|
||||
%%
|
||||
%start secrule;
|
||||
|
Reference in New Issue
Block a user