trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrushf...@apache.org
Subject [trafficserver] branch master updated: Parent Selection -- Balance treatment of primary and secondary parents in ProcessParents().
Date Fri, 04 May 2018 13:28:33 GMT
This is an automated email from the ASF dual-hosted git repository.

jrushford 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 d013fc9  Parent Selection -- Balance treatment of primary and secondary parents in
ProcessParents().
d013fc9 is described below

commit d013fc94530458027f78c3d4fea12c4a470ee06c
Author: Peter Chou <pbchou@labs.att.com>
AuthorDate: Wed May 2 22:20:59 2018 -0700

    Parent Selection -- Balance treatment of primary and secondary parents in ProcessParents().
    
    If an error is detected in ParentRecord::ProcessParents(), then the interim parent
    memory is freed. This was being done only for primary parents but not for secondary
    parents.
---
 proxy/ParentSelection.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/proxy/ParentSelection.cc b/proxy/ParentSelection.cc
index 86d8de7..b6a48bd 100644
--- a/proxy/ParentSelection.cc
+++ b/proxy/ParentSelection.cc
@@ -519,8 +519,13 @@ ParentRecord::ProcessParents(char *val, bool isPrimary)
   return nullptr;
 
 MERROR:
-  ats_free(parents);
-  parents = nullptr;
+  if (isPrimary) {
+    ats_free(parents);
+    parents = nullptr;
+  } else {
+    ats_free(secondary_parents);
+    secondary_parents = nullptr;
+  }
 
   return errPtr;
 }

-- 
To stop receiving notification emails like this one, please contact
jrushford@apache.org.

Mime
View raw message