[ https://issues.apache.org/jira/browse/TS-4089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15065495#comment-15065495 ]
ASF GitHub Bot commented on TS-4089: ------------------------------------ Github user asfgit closed the pull request at: https://github.com/apache/trafficserver/pull/390 > CID 1343608, 1343607: Parent selection Coverity issues > ------------------------------------------------------ > > Key: TS-4089 > URL: https://issues.apache.org/jira/browse/TS-4089 > Project: Traffic Server > Issue Type: Bug > Components: Parent Proxy > Reporter: Leif Hedstrom > Assignee: John Rushford > Labels: Coverity > Fix For: 6.1.0 > > > This is from the refactoring I'm pretty sure. > {code} > ** CID 1343608: Resource leaks (CTOR_DTOR_LEAK) > /proxy/ParentSelection.cc: 95 in > ParentConfigParams::ParentConfigParams(ControlMatcher<ParentRecord, > ParentResult> *)() > ________________________________________________________________________________________________________ > *** CID 1343608: Resource leaks (CTOR_DTOR_LEAK) > /proxy/ParentSelection.cc: 95 in > ParentConfigParams::ParentConfigParams(ControlMatcher<ParentRecord, > ParentResult> *)() > 89 > 90 ParentConfigParams::ParentConfigParams(P_table *_parent_table) > 91 { > 92 char *default_val = NULL; > 93 parent_table = _parent_table; > 94 > CID 1343608: Resource leaks (CTOR_DTOR_LEAK) > The constructor allocates field "policy" of "ParentConfigParams" but the > destructor and whatever functions it calls do not free it. > 95 policy = new ParentSelectionPolicy(); > 96 > 97 // Handle default parent > 98 PARENT_ReadConfigStringAlloc(default_val, default_var); > 99 DefaultParent = createDefaultParent(default_val); > 100 ats_free(default_val); > ** CID 1343607: Null pointer dereferences (FORWARD_NULL) > /proxy/ParentConsistentHash.cc: 158 in > ParentConsistentHash::selectParent(const ParentSelectionPolicy *, bool, > ParentResult *, RequestData *)() > ________________________________________________________________________________________________________ > *** CID 1343607: Null pointer dereferences (FORWARD_NULL) > /proxy/ParentConsistentHash.cc: 158 in > ParentConsistentHash::selectParent(const ParentSelectionPolicy *, bool, > ParentResult *, RequestData *)() > 152 Debug("parent_select", "Parent.failedAt = %u, retry = %u, > xact_start = %u", (unsigned int)pRec->failedAt, > 153 (unsigned int)policy->ParentRetryTime, (unsigned > int)request_info->xact_start); > 154 if ((pRec->failedAt + policy->ParentRetryTime) < > request_info->xact_start) { > 155 parentRetry = true; > 156 // make sure that the proper state is recorded in the > result structure > 157 // so that markParentUp() finds the proper record. > CID 1343607: Null pointer dereferences (FORWARD_NULL) > Dereferencing null pointer "prtmp". > 158 result->last_parent = prtmp->idx; > 159 result->last_lookup = last_lookup; > 160 result->retry = parentRetry; > 161 result->r = PARENT_SPECIFIED; > 162 markParentUp(result); > 163 Debug("parent_select", "Down parent %s is now retryable, > marked it available.", pRec->hostname); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)