trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [10/50] git commit: TS-2452: Can't access a deleted object
Date Fri, 03 Jan 2014 17:18:41 GMT
TS-2452: Can't access a deleted object

It's an obvious bug, blame me:(.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fb60e203
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fb60e203
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fb60e203

Branch: refs/heads/5.0.x
Commit: fb60e203baffad9aa18c9dec5dc335034052b842
Parents: 9da35d2
Author: Yunkai Zhang <qiushu.zyk@taobao.com>
Authored: Wed Dec 25 22:36:49 2013 +0800
Committer: Yunkai Zhang <qiushu.zyk@taobao.com>
Committed: Wed Dec 25 22:49:25 2013 +0800

----------------------------------------------------------------------
 CHANGES                    | 2 ++
 proxy/logging/LogObject.cc | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fb60e203/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index eb361c0..e600391 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 4.2.0
 
+  *) [TS-2452] Can't access a deleted object.
+
   *) [TS-2363] Fix assertion of "Unknown file format type!".
 
   *) [TS-2448] Fix traffic_cop and traffic_manager to obey the proxy.config.local_state_dir
setting.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fb60e203/proxy/logging/LogObject.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc
index 4869448..8790948 100644
--- a/proxy/logging/LogObject.cc
+++ b/proxy/logging/LogObject.cc
@@ -48,12 +48,12 @@ LogBufferManager::preproc_buffers(LogBufferSink *sink) {
       // Still has outstanding references.
       write_list.push(b);
     } else if (_num_flush_buffers > FLUSH_ARRAY_SIZE) {
-      delete b;
       ink_atomic_increment(&_num_flush_buffers, -1);
       Warning("Dropping log buffer, can't keep up.");
       RecIncrRawStat(log_rsb, this_thread()->mutex->thread_holding,
                      log_stat_bytes_lost_before_preproc_stat,
                      b->header()->byte_count);
+      delete b;
     } else {
       new_q.push(b);
     }


Mime
View raw message