Fix memory leak in rx operator when pattern includes macro

This commit is contained in:
martinhsv 2021-01-21 16:40:56 -08:00 committed by Felipe Zimmerle
parent 9764b1fb3b
commit 6ca028b6f5
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -69,14 +69,14 @@ bool Rx::evaluate(Transaction *transaction, RuleWithActions *rule,
logOffset(ruleMessage, capture.m_offset, capture.m_length); logOffset(ruleMessage, capture.m_offset, capture.m_length);
} }
if (!captures.empty()) {
return true;
}
if (m_string->m_containsMacro) { if (m_string->m_containsMacro) {
delete re; delete re;
} }
if (!captures.empty()) {
return true;
}
return false; return false;
} }