[
https://issues.apache.org/jira/browse/TS-2396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13832798#comment-13832798
]
ASF subversion and git services commented on TS-2396:
-----------------------------------------------------
Commit 3fe745442c6cf2ca53a1d684c6e52889381f4f4c in branch refs/heads/master
from [~happy_fish100]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=3fe7454 ]
TS-2396: UrlRewrite.cc free the node of queue not correctly
> UrlRewrite.cc free the node of queue not correctly
> --------------------------------------------------
>
> Key: TS-2396
> URL: https://issues.apache.org/jira/browse/TS-2396
> Project: Traffic Server
> Issue Type: Bug
> Components: HTTP
> Reporter: Yu Qing
> Assignee: Yu Qing
> Attachments:
> 0001-TS-2396-UrlRewrite.cc-free-the-node-of-queue-not-cor.patch
>
>
> the codes as:
> {code}
> 960 void
> 961 UrlRewrite::_destroyList(RegexMappingList &mappings)
> 962 {
> 963 forl_LL(RegexMapping, list_iter, mappings) {
> 964 delete list_iter->url_map;
> 965 if (list_iter->re) {
> 966 pcre_free(list_iter->re);
> 967 }
> 968 if (list_iter->re_extra) {
> 969 pcre_free(list_iter->re_extra);
> 970 }
> 971 if (list_iter->to_url_host_template) {
> 972 ats_free(list_iter->to_url_host_template);
> 973 }
> 974 delete list_iter;
> 975 }
> 976 mappings.clear();
> 977 }
> {code}
> Can't delete list_iter in the loop because the list_iter is the iterator for
> the loop.
--
This message was sent by Atlassian JIRA
(v6.1#6144)