mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
fix memory in transaction.cc when log REMOTE_USER
This commit is contained in:
@@ -1508,6 +1508,9 @@ std::string Transaction::toOldAuditLogFormatIndex(const std::string &filename,
|
|||||||
variables::RemoteUser *r = new variables::RemoteUser("REMOTE_USER");
|
variables::RemoteUser *r = new variables::RemoteUser("REMOTE_USER");
|
||||||
std::vector<const VariableValue *> l;
|
std::vector<const VariableValue *> l;
|
||||||
r->evaluate(this, NULL, &l);
|
r->evaluate(this, NULL, &l);
|
||||||
|
for (auto &a : l) {
|
||||||
|
delete a;
|
||||||
|
}
|
||||||
delete r;
|
delete r;
|
||||||
|
|
||||||
ss << utils::string::dash_if_empty(
|
ss << utils::string::dash_if_empty(
|
||||||
|
Reference in New Issue
Block a user