Removes referece count from audit logs

This commit is contained in:
Felipe Zimmerle 2019-01-22 12:06:13 -03:00
parent 4b94fabef9
commit 5ebfa5eacb
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
3 changed files with 2 additions and 17 deletions

View File

@ -183,18 +183,6 @@ class AuditLog {
std::string m_path2;
std::string m_storage_dir;
void refCountIncrease() {
m_refereceCount++;
}
bool refCountDecreaseAndCheck() {
m_refereceCount--;
if (m_refereceCount == 0) {
delete this;
return true;
}
return false;
}
AuditLogFormat m_format;
protected:
@ -215,7 +203,6 @@ class AuditLog {
std::string m_relevant;
audit_log::writer::Writer *m_writer;
int m_refereceCount;
};

View File

@ -61,8 +61,7 @@ AuditLog::AuditLog()
m_status(NotSetLogStatus),
m_type(NotSetAuditLogType),
m_relevant(""),
m_writer(NULL),
m_refereceCount(1) { }
m_writer(NULL) { }
AuditLog::~AuditLog() {

View File

@ -36,7 +36,7 @@ unmatchedSuppression:src/utils/geo_lookup.cc:82
useInitializationList:src/utils/shared_files.h:87
unmatchedSuppression:src/utils/msc_tree.cc
functionStatic:headers/modsecurity/transaction.h:373
duplicateBranch:src/audit_log/audit_log.cc:224
duplicateBranch:src/audit_log/audit_log.cc:223
unreadVariable:src/request_body_processor/multipart.cc:435
stlcstrParam:src/audit_log/writer/parallel.cc:145
functionStatic:src/engine/lua.h:71
@ -54,7 +54,6 @@ duplicateBranch:src/request_body_processor/multipart.cc:93
noExplicitConstructor:seclang-parser.hh
unusedFunction
missingIncludeSystem
useStlAlgorithm