You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/08/18 14:41:20 UTC
[jira] [Work logged] (TS-4746) ParentRecord *secondary_parents
malloc,but no place free,which will cause memery leak
[ https://issues.apache.org/jira/browse/TS-4746?focusedWorklogId=26570&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-26570 ]
ASF GitHub Bot logged work on TS-4746:
--------------------------------------
Author: ASF GitHub Bot
Created on: 18/Aug/16 14:41
Start Date: 18/Aug/16 14:41
Worklog Time Spent: 10m
Work Description: Github user jrushford commented on the issue:
https://github.com/apache/trafficserver/pull/873
I'm +1 on the changes but it might be better to create individual PR's and squash the two committs for TS-4746 due to misspelling of secondary_parents.
Issue Time Tracking
-------------------
Worklog Id: (was: 26570)
Time Spent: 10m
Remaining Estimate: 0h
> ParentRecord *secondary_parents malloc,but no place free,which will cause memery leak
> -------------------------------------------------------------------------------------
>
> Key: TS-4746
> URL: https://issues.apache.org/jira/browse/TS-4746
> Project: Traffic Server
> Issue Type: Bug
> Components: Parent Proxy
> Reporter: xiangdong chen
> Assignee: John Rushford
> Fix For: 7.0.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> secondary_parents is malloc in
> ParentRecord::ProcessParents(char *val, bool isPrimary)
> this->secondary_parents = (pRecord *)ats_malloc(sizeof(pRecord) * numTok); //line:372
> but no place to free it,which will cause memery leak.
> fix in
> ParentRecord::~ParentRecord()
> {
> if(parents != NULL) {
> ats_free(parents);
> }
> if(primary_parents != NULL){
> ats_free(primary_parents);
> }
> if(second_parents != NULL){
> ats_free(second_parents);
> }
> ......
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)