[ https://issues.apache.org/jira/browse/TS-4746?focusedWorklogId=27183&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-27183 ]
ASF GitHub Bot logged work on TS-4746: -------------------------------------- Author: ASF GitHub Bot Created on: 25/Aug/16 19:57 Start Date: 25/Aug/16 19:57 Worklog Time Spent: 10m Work Description: GitHub user jrushford opened a pull request: https://github.com/apache/trafficserver/pull/926 TS-4746: Fixes ParentRecord *secondary_parents memory leak Fixes memory leak found by @keith2008 You can merge this pull request into a Git repository by running: $ git pull https://github.com/jrushford/trafficserver TS-4746 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/trafficserver/pull/926.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #926 ---- commit 32edbd7ad3b654dee3922e7ef3208bb4f92f8e8f Author: John J. Rushford <jrushf...@apache.org> Date: 2016-08-25T19:51:26Z TS-4746: Fixes ParentRecord *secondary_parents memory leak ---- Issue Time Tracking ------------------- Worklog Id: (was: 27183) Time Spent: 1h 20m (was: 1h 10m) > 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: 1h 20m > 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)