[
https://issues.apache.org/jira/browse/TS-4577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15348562#comment-15348562
]
ASF GitHub Bot commented on TS-4577:
------------------------------------
Github user strotyl commented on the issue:
https://github.com/apache/trafficserver/pull/738
I just saw your note... I'm building another update.
> 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)