You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Yu Qing (JIRA)" <ji...@apache.org> on 2013/11/26 03:07:35 UTC

[jira] [Created] (TS-2396) UrlRewrite.cc free the node of queue not correctly

Yu Qing created TS-2396:
---------------------------

             Summary: 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


the codes as:
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 }

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)