This is an automated email from the ASF dual-hosted git repository.

oknet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new e6cb7bf  Set the block's m_water_level in Arena:free even if the block 
is not the last block
e6cb7bf is described below

commit e6cb7bfaec1cf3ff00baecf2a2ab8a07addab2bf
Author: unknown <[email protected]>
AuthorDate: Tue Mar 12 18:30:01 2019 +0800

    Set the block's m_water_level in Arena:free even if the block is not the 
last block
---
 src/tscore/Arena.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/tscore/Arena.cc b/src/tscore/Arena.cc
index 23469e0..1667923 100644
--- a/src/tscore/Arena.cc
+++ b/src/tscore/Arena.cc
@@ -133,12 +133,12 @@ Arena::free(void *mem, size_t size)
 
     b = m_blocks;
     while (b->next) {
+      if (b->m_water_level == ((char *)mem + size)) {
+        b->m_water_level = (char *)mem;
+        return;
+      }
       b = b->next;
     }
-
-    if (b->m_water_level == ((char *)mem + size)) {
-      b->m_water_level = (char *)mem;
-    }
   }
 }
 

Reply via email to