mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fix memory leak in the method toJSON from Transaction class
This commit is contained in:
parent
f833a61089
commit
9cec9db794
@ -1290,6 +1290,7 @@ std::string Transaction::toOldAuditLogFormat(int parts,
|
||||
for (auto h : l) {
|
||||
audit_log << h->m_key.c_str() << ": ";
|
||||
audit_log << h->m_value.c_str() << std::endl;
|
||||
delete h;
|
||||
}
|
||||
}
|
||||
if (parts & audit_log::AuditLog::CAuditLogPart) {
|
||||
@ -1312,6 +1313,7 @@ std::string Transaction::toOldAuditLogFormat(int parts,
|
||||
for (auto h : l) {
|
||||
audit_log << h->m_key.c_str() << ": ";
|
||||
audit_log << h->m_value.c_str() << std::endl;
|
||||
delete h;
|
||||
}
|
||||
}
|
||||
if (parts & audit_log::AuditLog::GAuditLogPart) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user