Avoids string copy by working with pointers while resolving variables

This commit is contained in:
Felipe Zimmerle
2016-12-27 15:25:11 -03:00
parent 7834cf857b
commit a7f465cf3a
38 changed files with 179 additions and 94 deletions

View File

@@ -80,6 +80,9 @@ void Rules::decrementReferenceCount(void) {
Rules::~Rules() {
int i = 0;
free(unicode_map_table);
unicode_map_table = NULL;
/** Cleanup the rules */
for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) {
std::vector<Rule *> rules = this->rules[i];
@@ -97,9 +100,6 @@ Rules::~Rules() {
tmp->pop_back();
}
}
free(unicode_map_table);
}