fix memory in transaction.cc when log REMOTE_USER

This commit is contained in:
Liu DongMiao 2022-04-24 17:06:30 +08:00 committed by GitHub
parent 3975f0f8fa
commit 6b7f2b0d63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1508,6 +1508,9 @@ std::string Transaction::toOldAuditLogFormatIndex(const std::string &filename,
variables::RemoteUser *r = new variables::RemoteUser("REMOTE_USER");
std::vector<const VariableValue *> l;
r->evaluate(this, NULL, &l);
for (auto &a : l) {
delete a;
}
delete r;
ss << utils::string::dash_if_empty(