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/05/09 10:30:51 UTC
[trafficserver] 01/06: Parent Selection -- Balance treatment of
primary and secondary parents in ProcessParents().
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 7cda414454f08103b6747ea29e1df9dfee3e64d8
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.
(cherry picked from commit d013fc94530458027f78c3d4fea12c4a470ee06c)
---
proxy/ParentSelection.cc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/proxy/ParentSelection.cc b/proxy/ParentSelection.cc
index 749bc40..27be401 100644
--- a/proxy/ParentSelection.cc
+++ b/proxy/ParentSelection.cc
@@ -474,8 +474,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
zwoop@apache.org.