mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Refactoring on the operators parsers (2/2)
This is the first step towards remove the memory leaks in the parser
This commit is contained in:
committed by
Felipe Zimmerle
parent
9cda4c0be0
commit
59114dd598
@@ -22,7 +22,7 @@
|
||||
#include "src/operators/operator.h"
|
||||
#include "src/utils/regex.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace modsecurity {
|
||||
using Utils::SMatch;
|
||||
using Utils::regex_search;
|
||||
@@ -42,6 +42,10 @@ class Rx : public Operator {
|
||||
: Operator(name, param) {
|
||||
m_re = new Regex(param);
|
||||
}
|
||||
explicit Rx(std::string param)
|
||||
: Operator("Rx", param) {
|
||||
m_re = new Regex(param);
|
||||
}
|
||||
|
||||
~Rx() {
|
||||
delete m_re;
|
||||
@@ -61,7 +65,5 @@ class Rx : public Operator {
|
||||
} // namespace operators
|
||||
} // namespace modsecurity
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SRC_OPERATORS_RX_H_
|
||||
|
Reference in New Issue
Block a user