[ https://issues.apache.org/jira/browse/TS-4577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15348590#comment-15348590 ]
ASF subversion and git services commented on TS-4577: ----------------------------------------------------- Commit 0ee06bf5394ec98c292eaa6664b384ea238404f0 in trafficserver's branch refs/heads/master from [~psudaemon] [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=0ee06bf ] Merge pull request #738 from strotyl/TS-4577 TS-4577 remap_stats: Fix memory leak > Coverity Resource leaks in remap_stats.cc > ----------------------------------------- > > Key: TS-4577 > URL: https://issues.apache.org/jira/browse/TS-4577 > Project: Traffic Server > Issue Type: Bug > Components: Plugins > Reporter: Leif Hedstrom > Assignee: Tyler Stroh > Fix For: 7.0.0 > > > {code} > ** CID 1356996: Resource leaks (RESOURCE_LEAK) > /plugins/experimental/remap_stats/remap_stats.c: 105 in get_effective_host() > ________________________________________________________________________________________________________ > *** CID 1356996: Resource leaks (RESOURCE_LEAK) > /plugins/experimental/remap_stats/remap_stats.c: 105 in get_effective_host() > 99 TSMLoc url_loc; > 100 > 101 effective_url = TSHttpTxnEffectiveUrlStringGet(txn, &len); > 102 buf = TSMBufferCreate(); > 103 if (TS_SUCCESS != TSUrlCreate(buf, &url_loc)) { > 104 TSDebug(DEBUG_TAG, "unable to create url"); > CID 1356996: Resource leaks (RESOURCE_LEAK) > Variable "buf" going out of scope leaks the storage it points to. > 105 return NULL; > 106 } > 107 tmp = effective_url; > 108 TSUrlParse(buf, url_loc, (const char **)(&tmp), (const char > *)(effective_url + len)); > 109 TSfree(effective_url); > 110 host = TSUrlHostGet(buf, url_loc, &len); > ** CID 1356995: Resource leaks (RESOURCE_LEAK) > /plugins/experimental/remap_stats/remap_stats.c: 105 in get_effective_host() > ________________________________________________________________________________________________________ > *** CID 1356995: Resource leaks (RESOURCE_LEAK) > /plugins/experimental/remap_stats/remap_stats.c: 105 in get_effective_host() > 99 TSMLoc url_loc; > 100 > 101 effective_url = TSHttpTxnEffectiveUrlStringGet(txn, &len); > 102 buf = TSMBufferCreate(); > 103 if (TS_SUCCESS != TSUrlCreate(buf, &url_loc)) { > 104 TSDebug(DEBUG_TAG, "unable to create url"); > CID 1356995: Resource leaks (RESOURCE_LEAK) > Variable "effective_url" going out of scope leaks the storage it points to. > 105 return NULL; > 106 } > 107 tmp = effective_url; > 108 TSUrlParse(buf, url_loc, (const char **)(&tmp), (const char > *)(effective_url + len)); > 109 TSfree(effective_url); > 110 host = TSUrlHostGet(buf, url_loc, &len); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)