Fixes regarding memory management

Fixes assorted issues identified by valgrind.
This commit is contained in:
Felipe Zimmerle
2016-06-15 23:52:26 -03:00
parent cb91af537c
commit 9919026620
46 changed files with 234 additions and 73 deletions

View File

@@ -27,6 +27,7 @@ CustomDebugLog *CustomDebugLog::new_instance() {
return new CustomDebugLog();
}
CustomDebugLog::~CustomDebugLog() { }
void CustomDebugLog::write(int level, const std::string& message) {
m_log << "[" << level << "] " << message << std::endl;
@@ -35,7 +36,6 @@ void CustomDebugLog::write(int level, const std::string& message) {
bool CustomDebugLog::contains(const std::string& pattern) {
modsecurity::Utils::Regex re(pattern);
modsecurity::Utils::SMatch match;
std::string s = m_log.str();
return modsecurity::Utils::regex_search(s, re);
}