You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/08/30 19:30:09 UTC
[trafficserver] 01/02: Log Collation - Memory leak when all hosts
are down.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 3bf26d17e6bb8aed07de5681a9bdc75e59b72294
Author: Peter Chou <pb...@labs.att.com>
AuthorDate: Mon Jul 30 23:33:16 2018 -0700
Log Collation - Memory leak when all hosts are down.
This patch is intended to address issue #2416. When all hosts are down, the log output is supposed to be
written to an orphan file. The LogHost::orphan_write_and_try_delete() is supposed to consume a LogBuffer
reference count, but it only does so in one branch of the if/then/else instead of both. This patch
fixes this issue.
---
proxy/logging/LogHost.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxy/logging/LogHost.cc b/proxy/logging/LogHost.cc
index 981bd12..851221e 100644
--- a/proxy/logging/LogHost.cc
+++ b/proxy/logging/LogHost.cc
@@ -302,8 +302,8 @@ LogHost::orphan_write_and_try_delete(LogBuffer *&lb)
m_orphan_file->preproc_and_try_delete(lb);
} else {
Debug("log-host", "logging space exhausted, failed to write orphan file, drop(%" PRIu32 ") bytes", lb->header()->byte_count);
- LogBuffer::destroy(lb);
}
+ LogBuffer::destroy(lb);
}
void