Skip to content

Commit 844e1bf

Browse files
authored
Merge pull request #2727 from liudongmiao/patch-1
fix memory leak when concurrent log includes REMOTE_USER
2 parents 0b6bd39 + 6b7f2b0 commit 844e1bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/transaction.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,9 @@ std::string Transaction::toOldAuditLogFormatIndex(const std::string &filename,
15081508
variables::RemoteUser *r = new variables::RemoteUser("REMOTE_USER");
15091509
std::vector<const VariableValue *> l;
15101510
r->evaluate(this, NULL, &l);
1511+
for (auto &a : l) {
1512+
delete a;
1513+
}
15111514
delete r;
15121515

15131516
ss << utils::string::dash_if_empty(

0 commit comments

Comments
 (0)