From ade995f89737ca922f15d3c7d516cb591fd50dd7 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Tue, 22 Jan 2019 12:06:13 -0300 Subject: [PATCH] Removes referece count from audit logs --- headers/modsecurity/audit_log.h | 13 ------------- src/audit_log/audit_log.cc | 3 +-- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/headers/modsecurity/audit_log.h b/headers/modsecurity/audit_log.h index 924739dd..50276dd4 100644 --- a/headers/modsecurity/audit_log.h +++ b/headers/modsecurity/audit_log.h @@ -181,18 +181,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: @@ -213,7 +201,6 @@ class AuditLog { std::string m_relevant; audit_log::writer::Writer *m_writer; - int m_refereceCount; }; diff --git a/src/audit_log/audit_log.cc b/src/audit_log/audit_log.cc index fb7fe625..68e2f2cb 100644 --- a/src/audit_log/audit_log.cc +++ b/src/audit_log/audit_log.cc @@ -61,8 +61,7 @@ AuditLog::AuditLog() m_type(NotSetAuditLogType), m_format(NotSetAuditLogFormat), m_relevant(""), - m_writer(NULL), - m_refereceCount(1) { } + m_writer(NULL) { } AuditLog::~AuditLog() {