You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jr...@apache.org on 2018/05/04 13:28:33 UTC

[trafficserver] branch master updated: Parent Selection -- Balance treatment of primary and secondary parents in ProcessParents().

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 <pb...@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.